use ngx.var.host
This commit is contained in:
+1
-9
@@ -4,16 +4,8 @@ package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
|
||||
|
||||
local _M = {}
|
||||
|
||||
--local strip_path = require("strip_path")
|
||||
--local Upyun = require('upyun')
|
||||
|
||||
function host(s)
|
||||
return (s.."/"):match("://(.-)/")
|
||||
end
|
||||
|
||||
|
||||
function _M.upt(uri)
|
||||
local hostname = host(uri)
|
||||
local hostname = ngx.var.host
|
||||
|
||||
local secret;
|
||||
if (hostname == 'moicen.com') then
|
||||
|
||||
Reference in New Issue
Block a user