# Security headers for bchanot.fr — included at server level AND in every # location that declares its own add_header: nginx add_header inheritance # is all-or-nothing (one add_header in a location drops ALL inherited # headers), so each such location must re-include this file. # HSTS is intentionally NOT here — it belongs to the TLS-terminating proxy. add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=()" always; # CSP: inline CSS + JS are allowed (project convention), fonts from Google. add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; script-src 'self' 'unsafe-inline'; img-src 'self' data:; base-uri 'self'; form-action 'self'; frame-ancestors 'self'" always;