表达js get user的远程ipaddress获取:: ffff:127.0.0.1

时间:2017-09-27 00:15:11

标签: node.js express

我无法检测到用户的ipaddress。我尝试使用变体,但这些是结果。

req.headers['x-forwarded-for']: undefined
req.connection.remoteAddress: ::ffff:127.0.0.1
req.socket.remoteAddress: ::ffff:127.0.0.1
req.ip: ::ffff:127.0.0.1

clientIp: ::ffff:127.0.0.1

0 个答案:

没有答案