diff --git a/src/lua/utils.lua b/src/lua/utils.lua index 827315c..2889ad2 100644 --- a/src/lua/utils.lua +++ b/src/lua/utils.lua @@ -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