From fa295b03762a0ae3220b8dcade7155674bb71ac0 Mon Sep 17 00:00:00 2001 From: o Date: Tue, 10 Mar 2015 19:05:31 +0100 Subject: support per-vhost hsts headers --- templates/vhosts/partials/ssl.erb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'templates') diff --git a/templates/vhosts/partials/ssl.erb b/templates/vhosts/partials/ssl.erb index 24e28f5..c9f3933 100644 --- a/templates/vhosts/partials/ssl.erb +++ b/templates/vhosts/partials/ssl.erb @@ -3,3 +3,6 @@ <% if configuration['ssl_certificate_chain_file'] || scope.lookupvar('apache::default_ssl_certificate_chain_file') != 'absent' -%> SSLCertificateChainFile <%= configuration['ssl_certificate_chain_file'] || scope.lookupvar('apache::default_ssl_certificate_chain_file') %> <% end -%> +<% if configuration['hsts'] -%> + Header add Strict-Transport-Security "max-age=<%= (configuration['hsts']['age'] || 15768000) rescue 15768000 %>" +<% end -%> -- cgit v1.2.3