pull/63/head
ibuler 2016-06-18 19:30:09 +08:00
parent 6d24afc4c6
commit 00a50e248d
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ debug = true
cc_deny = false cc_deny = false
cc_rate = '10/60' cc_rate = '10/60'
ip_check = true ip_check = true
ip_write_list = {} ip_white_list = {}
ip_black_list = {} ip_black_list = {}
--------- Init project ---------------- --------- Init project ----------------

View File

@ -266,7 +266,7 @@ function whiteIP()
for _, wip in pairs(ip_white_list) do for _, wip in pairs(ip_white_list) do
if ip == wip or innet(ip, wip) then if ip == wip or innet(ip, wip) then
if debug then if debug then
ngx.say(ip.."in white list <br />") ngx.say(ip.." in white list <br />")
end end
return true return true
end end
@ -281,7 +281,7 @@ function blackIP()
for _, bip in pairs(ip_black_list) do for _, bip in pairs(ip_black_list) do
if ip == bip or ip == "0.0.0.0" or innet(ip, bip) then if ip == bip or ip == "0.0.0.0" or innet(ip, bip) then
if debug then if debug then
ngx.say(ip.."in black list <br/>") ngx.say(ip.." in black list <br/>")
end end
ngx.exit(403) ngx.exit(403)
return true return true