Fix HSTS without preload (#2294)
This commit is contained in:
parent
13d390ebb0
commit
dd2bc91018
2 changed files with 2 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
@ -790,7 +790,7 @@ stream {
|
|||
location {{ $path }} {
|
||||
{{ if (and (not (empty $server.SSLCertificate)) $all.Cfg.HSTS) }}
|
||||
if ($scheme = https) {
|
||||
more_set_headers "Strict-Transport-Security: max-age={{ $all.Cfg.HSTSMaxAge }}{{ if $all.Cfg.HSTSIncludeSubdomains }}; includeSubDomains{{ end }};{{ if $all.Cfg.HSTSPreload }} preload{{ end }}";
|
||||
more_set_headers "Strict-Transport-Security: max-age={{ $all.Cfg.HSTSMaxAge }}{{ if $all.Cfg.HSTSIncludeSubdomains }}; includeSubDomains{{ end }}{{ if $all.Cfg.HSTSPreload }}; preload{{ end }}";
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue