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:
@ -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 }};
|
||||
|
Reference in New Issue
Block a user