nginx: Sicherheitsheader greifen jetzt wirklich (add_header wird nicht in location vererbt)

This commit is contained in:
till committed 2026-09-15 12:26:08 +02:00
1 parent 3fe8d9c324
commit 8548f6a3af
3 files changed
+17 -20

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# Sicherheitsheader. MUSS in jeden location-Block eingebunden werden, der ein
# eigenes add_header setzt - nginx vererbt add_header nicht in solche Bloecke hinein.
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "no-referrer" always;
add_header Strict-Transport-Security "max-age=31536000" always;
add_header Permissions-Policy "geolocation=(), camera=(), microphone=(), payment=(), usb=(), interest-cohort=()" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self'; connect-src 'none'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'; manifest-src 'self'; worker-src 'self'" always;