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}
|
|
|
|
}
|
2023-10-26 14:49:28 +02:00
|
|
|
}
|
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 {
|
2024-11-03 18:28:36 +01:00
|
|
|
{$CADDY_SERVER_LOG_OPTIONS}
|
2023-10-26 14:49:28 +02:00
|
|
|
# Redact the authorization query parameter that can be set by Mercure
|
|
|
|
format filter {
|
2024-06-25 17:10:38 +02:00
|
|
|
request>uri query {
|
|
|
|
replace authorization REDACTED
|
2023-09-14 14:11:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-21 11:30:28 +02:00
|
|
|
|
2024-11-16 10:59:22 +01:00
|
|
|
root /app/public
|
2024-02-04 23:35:57 +01:00
|
|
|
encode zstd br gzip
|
2023-10-26 14:49:28 +02:00
|
|
|
|
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-12-03 21:08:17 +01:00
|
|
|
{$CADDY_SERVER_EXTRA_DIRECTIVES}
|
|
|
|
|
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
|
|
|
|
2024-11-18 15:59:53 +02:00
|
|
|
@phpRoute {
|
|
|
|
not path /.well-known/mercure*
|
|
|
|
not file {path}
|
|
|
|
}
|
2024-11-16 10:59:22 +01:00
|
|
|
rewrite @phpRoute index.php
|
2024-11-18 15:59:53 +02:00
|
|
|
|
2024-11-16 10:59:22 +01:00
|
|
|
@frontController path index.php
|
|
|
|
php @frontController
|
2024-11-18 15:59:53 +02:00
|
|
|
|
2025-01-03 03:49:08 +02:00
|
|
|
file_server {
|
2025-01-03 23:21:11 +02:00
|
|
|
hide *.php
|
2025-01-03 03:49:08 +02:00
|
|
|
}
|
2020-10-19 15:30:43 +02:00
|
|
|
}
|