fix nginx security headers not being applied to https responses
Deploy nginx / deploy (push) Successful in 3s
Deploy nginx / test (push) Successful in 54s

nginx add_header inheritance meant X-Content-Type-Options and X-Frame-Options
were silently dropped from all https server blocks. moved all security headers
into a shared snippet (security-headers.inc) included per server block. added
pytest-based header verification that auto-discovers sites from conf files.
This commit is contained in:
2026-03-20 15:11:56 -04:00
parent 3b41653c04
commit cc07a34489
13 changed files with 622 additions and 11 deletions
+5
View File
@@ -0,0 +1,5 @@
add_header Strict-Transport-Security "max-age=63072000; preload" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;