fix duplicate hsts bug
This commit is contained in:
parent
49ba53b7b6
commit
54918c0ff2
2 changed files with 3 additions and 0 deletions
|
@ -142,7 +142,9 @@ function _M.rewrite(location_config)
|
||||||
|
|
||||||
ngx_redirect(uri, config.http_redirect_code)
|
ngx_redirect(uri, config.http_redirect_code)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _M.header()
|
||||||
if config.hsts and ngx.var.scheme == "https" and certificate_configured_for_current_request then
|
if config.hsts and ngx.var.scheme == "https" and certificate_configured_for_current_request then
|
||||||
local value = "max-age=" .. config.hsts_max_age
|
local value = "max-age=" .. config.hsts_max_age
|
||||||
if config.hsts_include_subdomains then
|
if config.hsts_include_subdomains then
|
||||||
|
|
|
@ -991,6 +991,7 @@ stream {
|
||||||
#}
|
#}
|
||||||
|
|
||||||
header_filter_by_lua_block {
|
header_filter_by_lua_block {
|
||||||
|
lua_ingress.header()
|
||||||
plugins.run()
|
plugins.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue