fix hsts-preload not work for redirects (from/to www)

Signed-off-by: joey <zchengjoey@gmail.com>
This commit is contained in:
joey 2024-08-12 14:42:59 +08:00
parent b93ccdf7b6
commit 974abac368
No known key found for this signature in database
GPG key ID: B5AE69C27B241A78

View file

@ -632,6 +632,11 @@ http {
}
{{ end }}
header_filter_by_lua_block {
lua_ingress.header()
plugins.run()
}
set_by_lua_block $redirect_to {
local request_uri = ngx.var.request_uri
if string.sub(request_uri, -1) == "/" then