-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: easier way to disable HTTPS and pass global options
- Loading branch information
Showing
8 changed files
with
69 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,27 @@ | ||
# Learn how to configure the Mercure.rocks Hub on https://mercure.rocks/docs/hub/config | ||
{ | ||
# Debug mode (disable it in production!) | ||
{$DEBUG} | ||
# HTTP/3 support | ||
servers { | ||
protocol { | ||
experimental_http3 | ||
} | ||
} | ||
{$GLOBAL_OPTIONS} | ||
} | ||
|
||
{$SERVER_NAME:localhost} | ||
|
||
log | ||
|
||
route { | ||
encode zstd gzip | ||
encode zstd gzip | ||
|
||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
|
||
respond /healthz 200 | ||
respond /healthz 200 | ||
|
||
respond "Not Found" 404 | ||
respond "Not Found" 404 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,34 @@ | ||
# Learn how to configure the Mercure.rocks Hub on https://mercure.rocks/docs/hub/config | ||
{ | ||
# Debug mode (disable it in production!) | ||
{$DEBUG:debug} | ||
# HTTP/3 support | ||
servers { | ||
protocol { | ||
experimental_http3 | ||
} | ||
} | ||
{$GLOBAL_OPTIONS} | ||
} | ||
|
||
{$SERVER_NAME:localhost} | ||
|
||
log | ||
|
||
route { | ||
redir / /.well-known/mercure/ui/ | ||
encode zstd gzip | ||
redir / /.well-known/mercure/ui/ | ||
encode zstd gzip | ||
|
||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Permissive configuration for the development environment | ||
cors_origins * | ||
publish_origins * | ||
demo | ||
anonymous | ||
subscriptions | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Permissive configuration for the development environment | ||
cors_origins * | ||
publish_origins * | ||
demo | ||
anonymous | ||
subscriptions | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
|
||
respond /healthz 200 | ||
respond /healthz 200 | ||
|
||
respond "Not Found" 404 | ||
respond "Not Found" 404 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters