1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 22:35:45 +00:00

Fixed #1080, can't disable HSTS with noredirect

This commit is contained in:
Steve Kamerman
2018-03-26 13:27:30 -04:00
parent a285717657
commit 936e57a6de
3 changed files with 19 additions and 2 deletions

View File

@ -19,7 +19,7 @@
server 127.0.0.1 down;
{{ end }}
{{ end }}
{{ end }}
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
@ -262,7 +262,7 @@ server {
ssl_trusted_certificate {{ printf "/etc/nginx/certs/%s.chain.pem" $cert }};
{{ end }}
{{ if (and (ne $https_method "noredirect") (ne $hsts "off")) }}
{{ if (not (or (eq $https_method "noredirect") (eq $hsts "off"))) }}
add_header Strict-Transport-Security "{{ trim $hsts }}" always;
{{ end }}