From a87d7b91cc95c8ac7aee327e4cf4d3ce564cdea1 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 6 Dec 2010 17:40:46 +0100 Subject: 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. --- templates/vhosts/gitweb/gitweb.erb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'templates/vhosts/gitweb/gitweb.erb') diff --git a/templates/vhosts/gitweb/gitweb.erb b/templates/vhosts/gitweb/gitweb.erb index 4beda07..0f72447 100644 --- a/templates/vhosts/gitweb/gitweb.erb +++ b/templates/vhosts/gitweb/gitweb.erb @@ -116,6 +116,10 @@ AddDefaultCharset <%= default_charset %> <%- end -%> + <%- if ssl_mode.to_s == 'force' then -%> + Header add Strict-Transport-Security "max-age=15768000" + <%- end -%> + SetEnv GITWEB_CONFIG <%= gitweb_config %> DirectoryIndex gitweb.cgi <%- if not ssl_mode.to_s == 'force' then -%> -- cgit v1.2.3