diff --git a/init.lua b/init.lua index eb44bf0..3eaf381 100644 --- a/init.lua +++ b/init.lua @@ -15,10 +15,7 @@ attacklog = optionIsOn(attacklog) CCDeny = optionIsOn(CCDeny) Redirect=optionIsOn(Redirect) function getClientIp() - IP = ngx.req.get_headers()["X-Real-IP"] - if IP == nil then - IP = ngx.var.remote_addr - end + IP = ngx.var.remote_addr if IP == nil then IP = "unknown" end