2020-10-19 15:30:43 +02:00
|
|
|
{
|
2023-09-14 14:11:07 +02:00
|
|
|
{$CADDY_GLOBAL_OPTIONS}
|
2023-09-20 16:53:05 +02:00
|
|
|
|
|
|
|
frankenphp {
|
|
|
|
{$FRANKENPHP_CONFIG}
|
|
|
|
}
|
2020-10-19 15:30:43 +02:00
|
|
|
|
2023-10-26 14:49:28 +02:00
|
|
|
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm
|
|
|
|
order mercure after encode
|
|
|
|
order vulcain after reverse_proxy
|
|
|
|
order php_server before file_server
|
|
|
|
}
|
2020-10-19 15:30:43 +02:00
|
|
|
|
2021-01-13 12:17:48 +01:00
|
|
|
{$CADDY_EXTRA_CONFIG}
|
|
|
|
|
2023-10-26 14:49:28 +02:00
|
|
|
{$SERVER_NAME:localhost} {
|
|
|
|
log {
|
|
|
|
# Redact the authorization query parameter that can be set by Mercure
|
|
|
|
format filter {
|
|
|
|
wrap console
|
|
|
|
fields {
|
|
|
|
uri query {
|
|
|
|
replace authorization REDACTED
|
|
|
|
}
|
2023-09-14 14:11:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-21 11:30:28 +02:00
|
|
|
|
2023-09-20 16:53:05 +02:00
|
|
|
root * /app/public
|
2023-10-26 14:49:28 +02:00
|
|
|
encode zstd gzip
|
|
|
|
|
2023-09-14 14:11:07 +02:00
|
|
|
mercure {
|
|
|
|
# Transport to use (default to Bolt)
|
|
|
|
transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/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}
|
|
|
|
# Allow anonymous subscribers (double-check that it's what you want)
|
|
|
|
anonymous
|
|
|
|
# Enable the subscription API (double-check that it's what you want)
|
|
|
|
subscriptions
|
|
|
|
# Extra directives
|
|
|
|
{$MERCURE_EXTRA_DIRECTIVES}
|
|
|
|
}
|
2023-09-20 16:53:05 +02:00
|
|
|
|
2023-10-26 14:49:28 +02:00
|
|
|
vulcain
|
2023-09-20 16:53:05 +02:00
|
|
|
|
2023-10-26 14:49:28 +02:00
|
|
|
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
|
|
|
|
header ?Permissions-Policy "browsing-topics=()"
|
2023-09-20 16:53:05 +02:00
|
|
|
|
2023-10-26 14:49:28 +02:00
|
|
|
php_server
|
2020-10-19 15:30:43 +02:00
|
|
|
}
|