Commit 564385f3 by Joneq

修改代码

parent cdd4c698
Showing with 1 additions and 17 deletions
......@@ -72,24 +72,8 @@ end
user_ip = reqhandle.GetRealIp()
spider_config_user_ip_button , err = red:get('spider_config_user_ip_button')
if spider_config_user_ip_button ~= ngx.null and tonumber(spider_config_user_ip_button)==1 then
user_ip = ngx.var.remote_addr
if user_ip == nil then
user_ip = ngx.req.get_headers()["x_forwarded_for"]
end
if user_ip == nil then
user_ip = ngx.req.get_headers()["X-Real-IP"]
end
if user_ip == nil then
user_ip = "unknown"
end
end
-- 获取请求头
local u_agent = ngx.req.get_headers().user_agent
u_agent = ngx.req.get_headers().user_agent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment