Enable HTTP2 and HSTS

This commit is contained in:
Greg Karékinian
2017-04-07 18:20:22 +02:00
parent 4e5d452aff
commit 6bea5b7567
5 changed files with 7 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
server {
listen 80;
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
listen <%= @server_port %> ssl spdy;
listen <%= @server_port %> ssl http2;
<% end -%>
server_name <%= @server_name %> <%= @server_aliases.join(" ") %>;
@@ -35,6 +35,7 @@ server {
}
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains";
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
<% end -%>