Sfoglia il codice sorgente

added strict transport security option

Fabian Peter Hammerle 8 anni fa
parent
commit
0658f85322
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      templates/vhosts.j2

+ 3 - 0
templates/vhosts.j2

@@ -24,6 +24,9 @@ server {
 {% if ssl %}
     ssl_certificate "{{ x509.cert_path }}";
     ssl_certificate_key "{{ x509.key_path }}";
+{% if vhost.strict_transport_security | default(false) %}
+    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; ";
+{% endif %}
 {% endif %}
 
 {% if vhost.root is defined %}