I need to obtain the IP address of the person who consumes the API I am working with, this is the code I am using:
app.post('/api/v1',(req,res) =>{
ConnectTelnet();
var ip = req.connection.remoteAddress;
console.log(ip);
})
But the result I get is this: ":: 1"
Does anyone know why and how to fix it?
Thanks