nginx: add security-related headers

This commit is contained in:
Alexander Dietrich 2018-11-16 22:34:59 +01:00
commit 77d88b0290
7 changed files with 40 additions and 9 deletions

View file

@ -6,9 +6,12 @@ server {
ssl_certificate {{ updates_tls_crt }};
ssl_certificate_key {{ updates_tls_key }};
root {{ updates_root }};
include snippets/autoindex.conf;
include snippets/header-hsts.conf;
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
}
{% endif %}
@ -18,8 +21,11 @@ server {
listen 80;
listen [::]:80;
root {{ updates_root }};
include snippets/autoindex.conf;
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
{% if updates_letsencrypt == 'local' %}
include snippets/location-acme.conf;
@ -33,6 +39,9 @@ server {
listen 80;
listen [::]:80;
root {{ updates_root }};
include snippets/autoindex.conf;
include snippets/header-security.conf;
include snippets/no-unsafe-files.conf;
root {{ updates_root }};
}