1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-08-24 00:11:55 +00:00

Merge pull request #1073 from b1f6c1c4/b1f6c1c4-patch-1

Add HSTS header regardless of status code
This commit is contained in:
Jason Wilder
2018-03-30 17:34:02 -04:00
committed by GitHub
3 changed files with 30 additions and 16 deletions

View File

@@ -263,7 +263,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)) }}