1
0
Fork 0

nginx being serious

This commit is contained in:
saibotk 2019-07-29 03:38:44 +02:00
parent 279424d86d
commit 31cadb9402

View file

@ -27,6 +27,12 @@ http {
#gzip on; #gzip on;
# Set HSTS if forwarded proto is https
map $http_x_forwarded_proto $hsts_header {
default "";
https "max-age=31536000; includeSubDomains;";
}
server { server {
listen 80 default_server; listen 80 default_server;
@ -60,9 +66,7 @@ http {
sendfile off; sendfile off;
if ($http_x_forwarded_proto = "https") { add_header Strict-Transport-Security $hsts_header;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;";
}
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none; add_header X-Robots-Tag none;