fix: use relative URL for self

This commit is contained in:
Iain Learmonth 2025-05-07 18:23:29 +01:00
parent 713393d36d
commit d1e40fa27f

View file

@ -75,6 +75,9 @@ end
function _M.get_mirror(host)
ngx.log(ngx.DEBUG, "Looking up mirror for " .. host)
local host_lower = host:lower()
if host_lower == ngx.ctx.jasima_host then
return "//" .. host_lower .. "/" -- This will get made relative by sub_filter later
end
local mirror = ngx.ctx.jasima_pool_map[host_lower]
return "//" .. (mirror or host) .. "/"
end