Adding security headers for NginX

This commit is contained in:
VC
2020-01-08 19:21:43 +01:00
parent 369bd4fc62
commit 2c8d784fd7
3 changed files with 10 additions and 0 deletions

View File

@@ -24,3 +24,8 @@
## verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
# Other security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;

View File

@@ -7,3 +7,7 @@ proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header Strict-Transport-Security;
proxy_hide_header X-Frame-Options;
proxy_hide_header X-Xss-Protection;
proxy_hide_header X-Content-Type-Options;

View File

@@ -1,6 +1,7 @@
server {
{% include './templates/header.conf.j2' %}
add_header Strict-Transport-Security "max-age=15768000" always;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;