Files
beauty-bookings/Caddyfile
elpatron e6ffb0ef6d Fix: Replace invalid 'file' directive with 'try_files' in Caddyfile
- Changed 'file favicon.png' to 'try_files {path}' which is the correct Caddy syntax
- Updated root path to /app/public for consistency
- This fixes the 'unrecognized directive: file' error in Caddy
2025-10-02 00:20:48 +02:00

50 lines
1.2 KiB
Caddyfile

# Caddyfile für Stargirlnails Kiel
# Automatisches SSL mit Let's Encrypt
stargirlnails.de {
# Reverse Proxy zur Anwendung
reverse_proxy stargirlnails:3000 {
# Health Check
health_uri /health
health_interval 30s
health_timeout 5s
}
# Sicherheits-Header
header {
# Sicherheits-Header
X-Frame-Options "SAMEORIGIN"
X-Content-Type-Options "nosniff"
X-XSS-Protection "1; mode=block"
Referrer-Policy "strict-origin-when-cross-origin"
Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self';"
# HSTS (wird automatisch von Caddy gesetzt)
Strict-Transport-Security "max-age=31536000; includeSubDomains"
}
# Gzip-Kompression
encode gzip
# Logging
log {
output file /var/log/caddy/access.log
format json
}
}
# HTTP zu HTTPS Redirect (automatisch von Caddy)
http://stargirlnails.de {
redir https://stargirlnails.de{uri} permanent
}
# Favicon-Konfiguration
favicon.ico {
redir /favicon.png 301
}
favicon.png {
root * /app/public
try_files {path}
}