1

I am having trouble detecting user's ipaddress. I tried using variations but these are the results.

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
Boy
  • 552
  • 3
  • 21
  • Well are you trying on the same computer ? (That shoud explain the `127.0.0.1` you get) – mJehanno Sep 27 '17 at 02:55
  • If you're behind a proxy, this may help: https://stackoverflow.com/a/10849772/3196753. There are some security warnings buried in the comments. – tresf Sep 27 '17 at 04:25
  • I am using chrome, the nodejs/expressjs is on an aws server – Boy Sep 27 '17 at 07:12

0 Answers0