diff options
| author | 2026-05-02 15:06:44 +0700 | |
|---|---|---|
| committer | 2026-05-02 15:06:44 +0700 | |
| commit | d3a63ca8a84bf4583bac8f5fd09bd52774bc4158 (patch) | |
| tree | 1a8b8582a75c966dd0a0c2c9d87e6aa1970795e2 /Caddyfile | |
| parent | ca1f36376865cb2a20923aa62fdff3ee217abde3 (diff) | |
| download | web-d3a63ca8a84bf4583bac8f5fd09bd52774bc4158.tar.gz web-d3a63ca8a84bf4583bac8f5fd09bd52774bc4158.zip | |
feat: migrate to uz.saya.casa
Diffstat (limited to 'Caddyfile')
| -rw-r--r-- | Caddyfile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..5781d74 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,50 @@ +{ + email saya.andy@posteo.com + + order rate_limit before reverse_proxy + + servers { + timeouts { + read_body 10s + read_header 5s + write 30s + idle 2m + } + } +} + +(saya-web) { + header { + Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" + X-Xss-Protection "1; mode=block" + X-Content-Type-Options "nosniff" + X-Frame-Options "DENY" + Content-Security-Policy "upgrade-insecure-requests" + Referrer-Policy "strict-origin-when-cross-origin" + Cache-Control "public, max-age=15, must-revalidate" + Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'self'; camera 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture *; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none'" + Server "No." + } + + request_body { + max_size 1MB + } + + rate_limit { + zone per_ip { + key {remote_host} + events 600 + window 1m + } + } +} + +stage.saya.uz { + import saya-web + reverse_proxy sayauz-stage:3000 +} + +saya.uz { + import saya-web + reverse_proxy sayauz-prod:3000 +} |