I am currently trying to get the IP of the requested user. The problem is the IP is returning ::ffff:127.0.0.1 instead of 127.0.0.1. I tried using
::ffff:127.0.0.1
127.0.0.1
Try this to get exact ip address by removing subnetting,
let ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress; ip = ip.toString().replace('::ffff:', '');