summaryrefslogtreecommitdiff
path: root/templates/vhosts/redirect
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-12-06 17:40:46 +0100
committermh <mh@immerda.ch>2010-12-06 17:40:46 +0100
commita87d7b91cc95c8ac7aee327e4cf4d3ce564cdea1 (patch)
tree7c97eba3a7610c8151ab9d8e048cad77f1dd7d06 /templates/vhosts/redirect
parentc8c3719c722c23dc5c4187eaf487947340a95478 (diff)
add STS header for enforced SSL sites
* http://en.wikipedia.org/wiki/Strict_Transport_Security This will tell browsers to interact with that site only per HTTPS.
Diffstat (limited to 'templates/vhosts/redirect')
-rw-r--r--templates/vhosts/redirect/redirect.erb4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/vhosts/redirect/redirect.erb b/templates/vhosts/redirect/redirect.erb
index ba93c46..e1928b5 100644
--- a/templates/vhosts/redirect/redirect.erb
+++ b/templates/vhosts/redirect/redirect.erb
@@ -61,6 +61,10 @@
CustomLog <%= logdir %>/access_log combined
<%- end -%>
+ <%- if ssl_mode.to_s == 'force' then -%>
+ Header add Strict-Transport-Security "max-age=15768000"
+
+ <%- end -%>
Redirect permanent / https://<%= options %>
</VirtualHost>