rybbit/Caddyfile
Bill Yang 0b11dc00f1 Fix
2025-04-16 17:58:09 -07:00

24 lines
No EOL
615 B
Caddyfile

# Caddyfile
# Use the domain name passed from docker-compose environment
{$DOMAIN_NAME} {
# Enable compression
encode zstd gzip
# Proxy API requests to the backend service
handle_path /api/* {
reverse_proxy backend:3001
}
# Proxy all other requests to the client service
handle {
reverse_proxy client:3002
}
# Optional: Add security headers (example)
# header {
# Strict-Transport-Security max-age=31536000;
# X-Content-Type-Options nosniff
# X-Frame-Options DENY
# Referrer-Policy strict-origin-when-cross-origin
# }
}