-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecurity-headers.conf
More file actions
11 lines (11 loc) · 1.03 KB
/
Copy pathsecurity-headers.conf
File metadata and controls
11 lines (11 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
# Security headers. Must be included in every location that uses add_header,
# because a location-level add_header discards all inherited headers.
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always;
# Scripts are self-hosted (fingerprinted theme.js) plus one tiny inline
# bootstrap (FOUC-free theme) hashed below. Inline style is the single-page
# CSS in layouts/index.html; JSON-LD is non-executable.
add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; script-src 'self' 'sha256-7W+MOIi4CLV6eMr8SYTntfNidqS1+ufbiTnezdA0p8M='; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; worker-src 'self'; object-src 'none'; upgrade-insecure-requests" always;