Browse Source

fix ip

pull/83/head v0.7.2
loveshell 9 years ago
parent
commit
3492d0601c
  1. 3
      init.lua

3
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
if IP == nil then
IP = "unknown"
end

Loading…
Cancel
Save