|
|
@ -15,10 +15,7 @@ attacklog = optionIsOn(attacklog)
|
|
|
|
CCDeny = optionIsOn(CCDeny)
|
|
|
|
CCDeny = optionIsOn(CCDeny)
|
|
|
|
Redirect=optionIsOn(Redirect)
|
|
|
|
Redirect=optionIsOn(Redirect)
|
|
|
|
function getClientIp()
|
|
|
|
function getClientIp()
|
|
|
|
IP = ngx.req.get_headers()["X-Real-IP"]
|
|
|
|
IP = ngx.var.remote_addr
|
|
|
|
if IP == nil then
|
|
|
|
|
|
|
|
IP = ngx.var.remote_addr
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if IP == nil then
|
|
|
|
if IP == nil then
|
|
|
|
IP = "unknown"
|
|
|
|
IP = "unknown"
|
|
|
|
end
|
|
|
|
end
|
|
|
|