Skip to content

Commit

Permalink
feat: add a default homepage (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jul 29, 2022
1 parent a44b9dd commit 7d41197
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ route {
{$MERCURE_EXTRA_DIRECTIVES}
}

respond / `<!DOCTYPE html>
<html lang=en>
<meta charset="utf-8">
<meta name="robots" content="noindex">
<title>Welcome to Mercure</title>
<h1>Welcome to Mercure</h1>
<p>The URL of your hub is <code>/.well-known/mercure</code>.
Read the documentation on <a href="https://mercure.rocks">Mercure.rocks, real-time apps made easy</a>.`
respond /healthz 200

respond "Not Found" 404
}
3 changes: 1 addition & 2 deletions Caddyfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ log {
{$EXTRA_DIRECTIVES}

route {
redir / /.well-known/mercure/ui/
encode zstd gzip

mercure {
Expand All @@ -39,7 +38,7 @@ route {
{$MERCURE_EXTRA_DIRECTIVES}
}

redir / /.well-known/mercure/ui/
respond /healthz 200

respond "Not Found" 404
}

0 comments on commit 7d41197

Please sign in to comment.