about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2015-11-21T17·25+0100
committerVincent Ambo <tazjin@gmail.com>2015-11-21T17·25+0100
commit8f8cb132fb805561a538c94e9f6ed809695bc8c9 (patch)
treebe8ea03a4ad24d533f19cb71749c6e7635604ea1
parent4a6dcafaad323664824819d60ba879f8f043b9f4 (diff)
[varnish] Add HSTS header to every response
-rw-r--r--varnish/default.vcl5
1 files changed, 4 insertions, 1 deletions
diff --git a/varnish/default.vcl b/varnish/default.vcl
index de08f4f646ff..ebf1854df855 100644
--- a/varnish/default.vcl
+++ b/varnish/default.vcl
@@ -30,8 +30,11 @@ sub vcl_backend_response {
         if (beresp.ttl < 1m) {
                 set beresp.ttl = 1m;
         }
+}
 
-        # Add an HSTS header to our response
+sub vcl_deliver {
+        # Add an HSTS header to everything
+        set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
 }
 
 sub vcl_synth {