Move header options around to give onion sites better protection
This commit is contained in:
parent
5f8d2d9161
commit
eec34f4740
|
@ -76,6 +76,10 @@ function nginx_disable_sniffing {
|
||||||
filename=/etc/nginx/sites-available/$domain_name
|
filename=/etc/nginx/sites-available/$domain_name
|
||||||
{ echo ' add_header X-Frame-Options DENY;';
|
{ echo ' add_header X-Frame-Options DENY;';
|
||||||
echo ' add_header X-Content-Type-Options nosniff;';
|
echo ' add_header X-Content-Type-Options nosniff;';
|
||||||
|
echo ' add_header X-XSS-Protection "1; mode=block";';
|
||||||
|
echo ' add_header X-Robots-Tag none;';
|
||||||
|
echo ' add_header X-Download-Options noopen;';
|
||||||
|
echo ' add_header X-Permitted-Cross-Domain-Policies none;';
|
||||||
echo ''; } >> "$filename"
|
echo ''; } >> "$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,11 +161,7 @@ function nginx_ssl {
|
||||||
else
|
else
|
||||||
echo " ssl_ciphers '$SSL_CIPHERS';" >> "$filename"
|
echo " ssl_ciphers '$SSL_CIPHERS';" >> "$filename"
|
||||||
fi
|
fi
|
||||||
{ echo " add_header Content-Security-Policy \"default-src https:; script-src https: 'unsafe-inline'; style-src https: 'unsafe-inline'\";";
|
echo " add_header Content-Security-Policy \"default-src https:; script-src https: 'unsafe-inline'; style-src https: 'unsafe-inline'\";" >> "$filename"
|
||||||
echo ' add_header X-XSS-Protection "1; mode=block";';
|
|
||||||
echo ' add_header X-Robots-Tag none;';
|
|
||||||
echo ' add_header X-Download-Options noopen;';
|
|
||||||
echo ' add_header X-Permitted-Cross-Domain-Policies none;'; } >> "$filename"
|
|
||||||
|
|
||||||
#nginx_stapling $1
|
#nginx_stapling $1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue