fix check logic
This commit is contained in:
+5
-1
@@ -4,8 +4,12 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
|||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
|
|
||||||
|
function host(s)
|
||||||
|
return (s.."/"):match("://(.-)/")
|
||||||
|
end
|
||||||
|
|
||||||
function _M.upt(uri)
|
function _M.upt(uri)
|
||||||
local hostname = ngx.var.host
|
local hostname = host(uri)
|
||||||
ngx.log(ngx.INFO, 'hostname...', hostname)
|
ngx.log(ngx.INFO, 'hostname...', hostname)
|
||||||
local secret;
|
local secret;
|
||||||
if string.find(hostname, "moicen.com") then
|
if string.find(hostname, "moicen.com") then
|
||||||
|
|||||||
Reference in New Issue
Block a user