levineuwirth.org/nginx
Levi Neuwirth 59fcc15ca6 nginx: preserve security baseline in every location; install on VPS
add_header is non-additive: any location declaring its own add_header
drops all server-context headers. archive.conf already re-included the
baseline for exactly this reason, but static-assets.conf (four cache
locations — including the JS/CSS responses where nosniff matters most)
and popup-proxy.conf (three proxy locations) did not. All seven now
re-include snippets/security-headers.conf.

Proxy locations additionally hide the upstream's own
STS/CSP/X-Frame-Options before re-adding ours: browsers honor only the
FIRST Strict-Transport-Security header (RFC 6797 §8.1), so arXiv's
max-age=300 passing through ahead of ours would have downgraded the
domain's cached HSTS policy on every popup fetch.

Server side (installed + verified live): security-headers.conf and
archive.conf wired into the vhost in vhost.conf.example's canonical
order; nginx-mod-brotli installed and loaded, so the .br sidecars
compress-assets.sh has always shipped are now actually served
(Content-Encoding: br verified). CSP remains Report-Only. Verified
headers on /, /css/*.css (baseline + Cache-Control together),
/archive/ (baseline + X-Robots-Tag), and /proxy/* (baseline +
X-Cache-Status, single STS).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 12:11:46 -04:00
..
archive.conf Add link archive system: snapshots, backlinks, link-rot 2026-05-23 10:06:33 -04:00
popup-proxy.conf nginx: preserve security baseline in every location; install on VPS 2026-06-10 12:11:46 -04:00
security-headers.conf Fix popup previews: proxy prefix-strip bug, arXiv IDs, Wikipedia images 2026-06-10 12:06:13 -04:00
static-assets.conf nginx: preserve security baseline in every location; install on VPS 2026-06-10 12:11:46 -04:00
vhost.conf.example Add link archive system: snapshots, backlinks, link-rot 2026-05-23 10:06:33 -04:00