发布时间:2018-11-16编辑:佚名阅读(1756)
//获取url请求客户端ip var get_client_ip = function(req) { var ip = req.headers['x-forwarded-for'] || req.ip || req.connection.remoteAddress || req.socket.remoteAddress || req.connection.socket.remoteAddress || ''; if(ip.split(',').length>0){ ip = ip.split(',')[0] } return ip; };
上一篇:Nginx下载配置与优化
0人
0人
0人
0人