fix check logic

This commit is contained in:
moicen
2023-05-07 02:29:38 +08:00
parent 82b15cada7
commit ee17b2f175
+5 -1
View File
@@ -4,8 +4,12 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
local _M = {}
function host(s)
return (s.."/"):match("://(.-)/")
end
function _M.upt(uri)
local hostname = ngx.var.host
local hostname = host(uri)
ngx.log(ngx.INFO, 'hostname...', hostname)
local secret;
if string.find(hostname, "moicen.com") then