Spaces:
Running
Running
Download Caddyfile from axeronis/microfunnel-api: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/Caddyfile
- Command line
-
hf download hf://spaces/axeronis/microfunnel-api/Caddyfile
-
curl -L -o Caddyfile https://huggingface.co/spaces/axeronis/microfunnel-api/resolve/main/Caddyfile
1.08 kB
| # Replace 'yourdomain.com' with your actual domain | |
| yourdomain.com { | |
| # Enable automatic HTTPS with Let's Encrypt | |
| tls { | |
| # Email for Let's Encrypt notifications | |
| email admin@yourdomain.com | |
| } | |
| # Reverse proxy to backend | |
| reverse_proxy backend:8000 { | |
| header_up X-Real-IP {remote} | |
| header_up X-Forwarded-For {remote} | |
| header_up X-Forwarded-Proto {scheme} | |
| } | |
| # Enable gzip compression | |
| encode gzip | |
| # Logging | |
| log { | |
| output file /var/log/caddy/access.log | |
| format json | |
| } | |
| # Security headers | |
| header { | |
| # Enable HSTS | |
| Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" | |
| # Prevent clickjacking | |
| X-Frame-Options "SAMEORIGIN" | |
| # XSS protection | |
| X-Content-Type-Options "nosniff" | |
| # Referrer policy | |
| Referrer-Policy "strict-origin-when-cross-origin" | |
| # Remove server header | |
| -Server | |
| } | |
| } | |
| # Optional: Redirect www to non-www | |
| www.yourdomain.com { | |
| redir https://yourdomain.com{uri} permanent | |
| } | |