pull/63/head
ibuler 2016-06-18 19:13:41 +08:00
parent 7890ae1c44
commit 48335cb152
1 changed files with 5 additions and 5 deletions

View File

@ -265,9 +265,9 @@ function whiteIP()
ip = getClientIp() ip = getClientIp()
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
end end
@ -281,8 +281,8 @@ 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
end end