Add security-related http headers

This commit is contained in:
Jonathan Cremin 2016-08-31 18:14:26 +02:00
parent ffa01ba586
commit 0254e42b9c

View file

@ -10,7 +10,7 @@ server {
server_name {{ .NOSSL_SERVER_NAME }};
access_log /var/log/nginx/{{ .APP }}-access.log;
error_log /var/log/nginx/{{ .APP }}-error.log;
return 301 https://$host:{{ .NGINX_SSL_PORT }}$request_uri;
return 301 https://$host$request_uri;
}
server {
@ -27,6 +27,7 @@ server {
keepalive_timeout 70;
add_header Alternate-Protocol {{ .NGINX_SSL_PORT }}:npn-spdy/2;
add_header Strict-Transport-Security "max-age=31536000" always;
location /apps/ {
alias {{ .DOKKU_ROOT }}/{{ .APP }}/apps/;
@ -68,6 +69,7 @@ server {
keepalive_timeout 70;
add_header Alternate-Protocol {{ .NGINX_SSL_PORT }}:npn-spdy/2;
add_header Strict-Transport-Security "max-age=31536000" always;
location / {
gzip on;