mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
54 lines
1.1 KiB
Caddyfile
54 lines
1.1 KiB
Caddyfile
{
|
|
{$CADDY_GLOBAL_OPTIONS}
|
|
|
|
admin {$CADDY_SERVER_ADMIN_HOST}:{$CADDY_SERVER_ADMIN_PORT}
|
|
|
|
frankenphp {
|
|
worker {
|
|
file "{$APP_PUBLIC_PATH}/frankenphp-worker.php"
|
|
{$CADDY_SERVER_WORKER_DIRECTIVE}
|
|
{$CADDY_SERVER_WATCH_DIRECTIVES}
|
|
}
|
|
}
|
|
}
|
|
|
|
{$CADDY_EXTRA_CONFIG}
|
|
|
|
{$CADDY_SERVER_SERVER_NAME} {
|
|
log {
|
|
level {$CADDY_SERVER_LOG_LEVEL}
|
|
|
|
# Redact the authorization query parameter that can be set by Mercure...
|
|
format filter {
|
|
wrap {$CADDY_SERVER_LOGGER}
|
|
fields {
|
|
request>uri query {
|
|
replace authorization REDACTED
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
route {
|
|
root * "{$APP_PUBLIC_PATH}"
|
|
encode zstd br gzip
|
|
|
|
# Mercure configuration is injected here...
|
|
{$CADDY_SERVER_EXTRA_DIRECTIVES}
|
|
|
|
# User uploads (public/storage symlink) are served as static files only,
|
|
# so an uploaded .php file is never handed to PHP...
|
|
handle /storage/* {
|
|
header X-Content-Type-Options nosniff
|
|
file_server
|
|
}
|
|
|
|
php_server {
|
|
index frankenphp-worker.php
|
|
try_files {path} frankenphp-worker.php
|
|
# Required for the public/storage/ directory...
|
|
resolve_root_symlink
|
|
}
|
|
}
|
|
}
|