Merge 3e8f7eacd0
into 314a2f62ec
commit
593028e6d6
15
init.lua
15
init.lua
|
@ -78,9 +78,18 @@ function whiteurl()
|
||||||
if WhiteCheck then
|
if WhiteCheck then
|
||||||
if wturlrules ~=nil then
|
if wturlrules ~=nil then
|
||||||
for _,rule in pairs(wturlrules) do
|
for _,rule in pairs(wturlrules) do
|
||||||
if ngxmatch(ngx.var.uri,rule,"isjo") then
|
--针对site:开始的进行域名匹配。增加白名单用处。
|
||||||
return true
|
local sitemod,_=string.find(rule,"site:")
|
||||||
end
|
if sitemod==1 then
|
||||||
|
rule=string.gsub(rule,"site:","",1)
|
||||||
|
if ngxmatch(ngx.var.host..ngx.var.uri,rule,"isjo") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if ngxmatch(ngx.var.uri,rule,"isjo") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue