diff options
author | o <o@immerda.ch> | 2015-03-10 19:05:31 +0100 |
---|---|---|
committer | o <o@immerda.ch> | 2015-03-10 19:05:31 +0100 |
commit | fa295b03762a0ae3220b8dcade7155674bb71ac0 (patch) | |
tree | d1595d9f67100e0e40b2c75c4b9d40c90fa60aee | |
parent | 39bbb27079fe22ad3ed0f220d32ff5f3ce3cb666 (diff) |
support per-vhost hsts headers
-rw-r--r-- | templates/vhosts/partials/ssl.erb | 3 |
1 files changed, 3 insertions, 0 deletions
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 -%> |