nginx: X-Xss-Protectio & -Content-Type-Options

via https://securityheaders.io/ via znc/znc#1168
This commit is contained in:
Aminda Suomalainen 2015-10-25 09:18:34 +02:00
parent ad6acf1be9
commit a5ca47e88d
3 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,8 @@ server {
add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload"; add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload";
add_header X-Frame-Options SAMEORIGIN; add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests; add_header Content-Security-Policy upgrade-insecure-requests;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
# OCSP Stapling --- # OCSP Stapling ---
# fetch OCSP records from URL in ssl_certificate and cache them # fetch OCSP records from URL in ssl_certificate and cache them

View File

@ -8,6 +8,8 @@ server {
add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload"; add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload";
add_header X-Frame-Options SAMEORIGIN; add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests; add_header Content-Security-Policy upgrade-insecure-requests;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
server_name something.example.org; server_name something.example.org;

View File

@ -10,6 +10,8 @@ server {
add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload"; add_header Strict-Transport-Security "max-age=15552000; includeSubdomains; preload";
add_header X-Frame-Options SAMEORIGIN; add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests; add_header Content-Security-Policy upgrade-insecure-requests;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
root /var/www/vhostdir; root /var/www/vhostdir;
index index.php index.html index.htm; index index.php index.html index.htm;