HSTS for SSL Terminated Environments
This commit is contained in:
parent
005ed5243f
commit
a03c6c088a
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ http {
|
||||||
ssl_certificate_key {{ $server.SSLCertificate }};
|
ssl_certificate_key {{ $server.SSLCertificate }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if (and (not (empty $server.SSLCertificate)) $cfg.HSTS) }}
|
{{ if (and $cfg.HSTS (or (not (empty $server.SSLCertificate)) $location.Redirect.ForceSSLRedirect)) }}
|
||||||
more_set_headers "Strict-Transport-Security: max-age={{ $cfg.HSTSMaxAge }}{{ if $cfg.HSTSIncludeSubdomains }}; includeSubDomains{{ end }};{{ if $cfg.HSTSPreload }} preload{{ end }}";
|
more_set_headers "Strict-Transport-Security: max-age={{ $cfg.HSTSMaxAge }}{{ if $cfg.HSTSIncludeSubdomains }}; includeSubDomains{{ end }};{{ if $cfg.HSTSPreload }} preload{{ end }}";
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue