摘要: --获取客户端ip function get_client_ip() local headers=ngx.req.get_headers() local ip=headers["X-REAL-IP"] or headers["X_FORWARDED_FOR"] or ngx.var.remote_addr or "0.0.0.0" return ip end 阅读全文
posted @ 2016-04-21 18:14 涛光 阅读(7828) 评论(0) 推荐(0) 编辑