Update init.lua
parent
8c0326ee8f
commit
62031899e1
20
init.lua
20
init.lua
|
@ -10,6 +10,7 @@ UrlDeny = optionIsOn(UrlDeny)
|
||||||
PostCheck = optionIsOn(postMatch)
|
PostCheck = optionIsOn(postMatch)
|
||||||
CookieCheck = optionIsOn(cookieMatch)
|
CookieCheck = optionIsOn(cookieMatch)
|
||||||
WhiteCheck = optionIsOn(whiteModule)
|
WhiteCheck = optionIsOn(whiteModule)
|
||||||
|
WhiteServerName = optionIsOn(WhiteServerName)
|
||||||
PathInfoFix = optionIsOn(PathInfoFix)
|
PathInfoFix = optionIsOn(PathInfoFix)
|
||||||
attacklog = optionIsOn(attacklog)
|
attacklog = optionIsOn(attacklog)
|
||||||
CCDeny = optionIsOn(CCDeny)
|
CCDeny = optionIsOn(CCDeny)
|
||||||
|
@ -66,6 +67,7 @@ uarules=read_rule('user-agent')
|
||||||
wturlrules=read_rule('whiteurl')
|
wturlrules=read_rule('whiteurl')
|
||||||
postrules=read_rule('post')
|
postrules=read_rule('post')
|
||||||
ckrules=read_rule('cookie')
|
ckrules=read_rule('cookie')
|
||||||
|
white_servername = read_rule('white_servername')
|
||||||
|
|
||||||
|
|
||||||
function say_html()
|
function say_html()
|
||||||
|
@ -89,6 +91,24 @@ function whiteurl()
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function white_servername()
|
||||||
|
if WhiteServerName then:
|
||||||
|
host = ngx.req.get_headers()["Host"]
|
||||||
|
if host == nil then
|
||||||
|
return false;
|
||||||
|
if white_servername ~= nil then
|
||||||
|
for _, rule in pairs(white_servername) do
|
||||||
|
if ngxmatch(host, rule, "isjo") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function fileExtCheck(ext)
|
function fileExtCheck(ext)
|
||||||
local items = Set(black_fileExt)
|
local items = Set(black_fileExt)
|
||||||
ext=string.lower(ext)
|
ext=string.lower(ext)
|
||||||
|
|
Loading…
Reference in New Issue