Merge hsts snippet into security snippet
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
# Enable HSTS header
|
||||
# Only add this to server blocks with TLS
|
||||
proxy_hide_header Strict-Transport-Security;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
@@ -1,9 +1,16 @@
|
||||
# Global security headers - apply everywhere
|
||||
|
||||
proxy_hide_header Strict-Transport-Security;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
|
||||
# We do not set clipboard-write() here, because it is very commonly used
|
||||
proxy_hide_header Strict-Transport-Security;
|
||||
add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-create=self, publickey-credentials-get=self, screen-wake-lock=(), serial=(), speaker-selection=(), sync-xhr=(), usb=(), xr-spatial-tracking=()" always;
|
||||
|
||||
# Access-Control-Max-Age
|
||||
proxy_hide_header Access-Control-Max-Age;
|
||||
add_header Access-Control-Max-Age "600";
|
||||
|
||||
proxy_hide_header Permissions-Policy;
|
||||
add_header Referrer-Policy "same-origin" always;
|
||||
|
||||
@@ -13,10 +20,6 @@ add_header X-Content-Type-Options "nosniff" always;
|
||||
proxy_hide_header X-Permitted-Cross-Domain-Policies;
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
|
||||
# Access-Control-Max-Age
|
||||
proxy_hide_header Access-Control-Max-Age;
|
||||
add_header Access-Control-Max-Age "600";
|
||||
|
||||
# Obsolete and replaced by Content-Security-Policy frame-ancestors
|
||||
# Setting the less restrictive SAMEORIGIN here, as frame-ancestors 'none' will overwrite it anyways
|
||||
proxy_hide_header X-Frame-Options;
|
||||
|
Reference in New Issue
Block a user