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

Removed HSTS when HTTPS_METHOD=noredirect, added tests, improved docs wrt HSTS

This commit is contained in:
Steve Kamerman
2016-05-19 23:20:43 -04:00
parent 3d77979efb
commit da3e257843
3 changed files with 37 additions and 2 deletions

View File

@ -153,7 +153,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 }};