forum/frankenphp/Caddyfile

60 lines
1.2 KiB
Caddyfile
Raw Permalink Normal View History

{
{$CADDY_GLOBAL_OPTIONS}
2023-09-20 16:53:05 +02:00
frankenphp {
{$FRANKENPHP_CONFIG}
}
}
{$CADDY_EXTRA_CONFIG}
{$SERVER_NAME:localhost} {
log {
2024-11-03 18:28:36 +01:00
{$CADDY_SERVER_LOG_OPTIONS}
# 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
}
}
}
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
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
vulcain
2023-09-20 16:53:05 +02:00
2023-12-03 21:08:17 +01:00
{$CADDY_SERVER_EXTRA_DIRECTIVES}
# 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
@phpRoute {
not path /.well-known/mercure*
not file {path}
}
2024-11-16 10:59:22 +01:00
rewrite @phpRoute index.php
2024-11-16 10:59:22 +01:00
@frontController path index.php
php @frontController
file_server {
hide *.php
}
}