Browse Source

Add HSTS header regardless of status code

See nginx [doc](http://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header) and [blog](https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/).
b1f6c1c4 7 năm trước cách đây
mục cha
commit
7a769a6a22
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      nginx.tmpl

+ 1 - 1
nginx.tmpl

@@ -260,7 +260,7 @@ server {
 	{{ end }}
 
 	{{ if (and (ne $https_method "noredirect") (ne $hsts "off")) }}
-	add_header Strict-Transport-Security "{{ trim $hsts }}";
+	add_header Strict-Transport-Security "{{ trim $hsts }}" always;
 	{{ end }}
 
 	{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}