diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-03-30 21:45:43 +0300 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-03-30 21:45:43 +0300 |
commit | 54261953e711e67e4ee28f788ea35bcab0e86654 (patch) | |
tree | 69eef65ef208b2a27b157d404c96b0d4051e2b5b /roles/common-web/files | |
parent | f81d8c68ba20100c13859ed522c41bed4f27d88b (diff) |
Set HTTP security headers.
See https://securityheaders.io .
Diffstat (limited to 'roles/common-web/files')
-rw-r--r-- | roles/common-web/files/etc/nginx/sites-available/default | 1 | ||||
-rw-r--r-- | roles/common-web/files/etc/nginx/snippets/headers.conf | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/roles/common-web/files/etc/nginx/sites-available/default b/roles/common-web/files/etc/nginx/sites-available/default index 6df1615..6cbea18 100644 --- a/roles/common-web/files/etc/nginx/sites-available/default +++ b/roles/common-web/files/etc/nginx/sites-available/default @@ -8,4 +8,5 @@ server { # serve ACME challenges on all virtual hosts # /!\ need to be served individually for each explicit virtual host as well! include snippets/acme-challenge.conf; + include snippets/headers.conf; } diff --git a/roles/common-web/files/etc/nginx/snippets/headers.conf b/roles/common-web/files/etc/nginx/snippets/headers.conf new file mode 100644 index 0000000..60e5ace --- /dev/null +++ b/roles/common-web/files/etc/nginx/snippets/headers.conf @@ -0,0 +1,4 @@ +# https://securityheaders.io/ +add_header X-Frame-Options "SAMEORIGIN"; +add_header X-Content-Type-Options nosniff; +add_header X-XSS-Protection "1; mode=block"; |