Send HSTS from nginx, not the API

nginx serves /assets, /uploads and the fallback index.html itself, so
the API's HSTS header never reached them. nginx now sends it on
everything and the API stops, so proxied pages don't get it twice.
docs/security-headers.md says who sends which header and what nginx
must pass (Host, X-Forwarded-For) for the CSRF check and rate limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-28 22:20:53 -05:00
parent c0a5e3ceeb
commit bff082652a
5 changed files with 80 additions and 5 deletions

View file

@ -90,6 +90,8 @@ with it off it blocks everything.
location @static {
try_files /index.html =404;
}
# (A block that adds headers of its own, eg. Cache-Control, must
# repeat the server-level HSTS line: docs/security-headers.md.)
# From the API, so Site settings' indexing switch applies; the
# build's own robots.txt if the API is down.