//获取前端请求过来的IP地址 let ip = (req.headers['x-real-ip'] || req.connection.remoteAddress).slice(7); //解决中文乱码 res.setHeader("content-Type",'text/plain;charset=UTF-8')