apache: Add support for HTTP Strict Transport Security

This commit is contained in:
Ossi Salmi 2013-08-14 14:31:23 +03:00
parent a3b970ab8e
commit e6d7688bdc
4 changed files with 20 additions and 3 deletions

View file

@ -148,6 +148,13 @@ BrowserMatch "MSIE [2-5]" \
# compact non-error SSL logfile on a virtual host basis.
#CustomLog logs/ssl_request_log \
# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
<% if @hsts == true -%>
# Enable HTTP Strict Transport Security
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000"
</IfModule>
<% end -%>
Include <%= @site_confdir %>/*.conf