sdf
parent
4787ba9060
commit
4d96926d19
6
init.lua
6
init.lua
|
@ -201,7 +201,7 @@ function denyCC(cc_rate, cc_deny_seconds)
|
|||
if debug then
|
||||
ngx.say('Deny by waf.')
|
||||
ngx.exit('200')
|
||||
return false
|
||||
return true
|
||||
else
|
||||
ngx.exit(404)
|
||||
end
|
||||
|
@ -211,7 +211,7 @@ function denyCC(cc_rate, cc_deny_seconds)
|
|||
if req > cc_count then
|
||||
limit:set(ip, 1, cc_deny_seconds)
|
||||
ngx.exit(404)
|
||||
return false
|
||||
return true
|
||||
else
|
||||
limit:incr(token, 1)
|
||||
end
|
||||
|
@ -252,7 +252,7 @@ end
|
|||
-- end
|
||||
|
||||
function innet(ip, network)
|
||||
matched = string.match(ip, network)
|
||||
matched = string.match(network, ip)
|
||||
if match then
|
||||
return true
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue