ui - update redirect logic to exclude /.well-known paths

This commit is contained in:
Théophile Diot 2024-11-13 12:17:25 +01:00
parent 4f4cc755ef
commit 52a3814728
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -7,7 +7,7 @@ access_by_lua_block {
if scheme == "http" and http_host ~= nil and http_host ~= "" and request_uri and request_uri ~= "" then
return ngx.redirect("https://" .. http_host .. request_uri, ngx.HTTP_MOVED_PERMANENTLY)
end
if scheme == "https" and request_uri and request_uri ~= "" and not request_uri:match("^/setup") then
if scheme == "https" and request_uri and request_uri ~= "" and not request_uri:match("^/setup") and not request_uri:match("^/%.well%-known") then
return ngx.redirect("https://" .. http_host .. "/setup", ngx.HTTP_MOVED_TEMPORARILY)
end
}