sdf
parent
7890ae1c44
commit
48335cb152
10
init.lua
10
init.lua
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue