Created
January 7, 2026 13:44
-
-
Save Danielk84/90275bc7b369b39b46bc567aa75837cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| # debug | |
| grace_period 10s | |
| shutdown_delay 30s | |
| # email admin@example.com | |
| # default_sni example.com | |
| # local_certs | |
| # acme_ca https://acme-staging-v02.api.letsencrypt.org/directory | |
| # acme_ca_root /path/to/ca/root.pem | |
| renew_interval 1h | |
| servers :443 { | |
| listener_wrappers { | |
| http_redirect | |
| tls | |
| } | |
| timeouts { | |
| read_body 10s | |
| read_header 5s | |
| write 30s | |
| idle 10m | |
| } | |
| protocols h2 | |
| } | |
| } | |
| # example.com, | |
| localhost { | |
| header { | |
| Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" | |
| X-Frame-Options "DENY" | |
| X-Content-Type-Options "nosniff" | |
| Referrer-Policy "strict-origin-when-cross-origin" | |
| } | |
| encode zstd gzip | |
| # Backends | |
| handle_path /api/* { | |
| reverse_proxy 0.0.0.0:8081 { | |
| lb_policy least_conn | |
| transport http { | |
| tls | |
| keepalive 1m | |
| versions 2 | |
| } | |
| } | |
| } | |
| # SPAs | |
| handle { | |
| root * /srv | |
| try_files {path} /index.html | |
| file_server /* { | |
| hide .git | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment