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

Merge pull request #462 from kamermans/master

Disable HSTS when HTTPS_METHOD=noredirect
This commit is contained in:
Jason Wilder
2016-06-12 15:28:08 -06:00
committed by GitHub
3 changed files with 37 additions and 1 deletions

View File

@ -155,7 +155,9 @@ server {
ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }};
{{ end }}
{{ if (ne $https_method "noredirect") }}
add_header Strict-Transport-Security "max-age=31536000";
{{ end }}
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
include {{ printf "/etc/nginx/vhost.d/%s" $host }};