parent
bbc0863fe6
commit
07433a9c3d
|
@ -8,7 +8,6 @@ postMatch="on"
|
||||||
whiteModule="on"
|
whiteModule="on"
|
||||||
black_fileExt={"php","jsp"}
|
black_fileExt={"php","jsp"}
|
||||||
ipWhitelist={"127.0.0.1"}
|
ipWhitelist={"127.0.0.1"}
|
||||||
servernameWhitelist={"www.baidu.com"}
|
|
||||||
ipBlocklist={"1.0.0.1"}
|
ipBlocklist={"1.0.0.1"}
|
||||||
CCDeny="off"
|
CCDeny="off"
|
||||||
CCrate="100/60"
|
CCrate="100/60"
|
||||||
|
|
12
init.lua
12
init.lua
|
@ -241,15 +241,3 @@ function blockip()
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function whiteSvrName()
|
|
||||||
if next(servernameWhitelist) ~= nil then
|
|
||||||
for _,svrname in pairs(servernameWhitelist) do
|
|
||||||
if ngx.var.server_name == svrname then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
1
waf.lua
1
waf.lua
|
@ -3,7 +3,6 @@ local method=ngx.req.get_method()
|
||||||
local ngxmatch=ngx.re.match
|
local ngxmatch=ngx.re.match
|
||||||
if whiteip() then
|
if whiteip() then
|
||||||
elseif blockip() then
|
elseif blockip() then
|
||||||
elseif whiteSvrName() then
|
|
||||||
elseif denycc() then
|
elseif denycc() then
|
||||||
elseif ngx.var.http_Acunetix_Aspect then
|
elseif ngx.var.http_Acunetix_Aspect then
|
||||||
ngx.exit(444)
|
ngx.exit(444)
|
||||||
|
|
Loading…
Reference in New Issue