In my socket.io code,
socket.sockets.on('connection', function(client){
var ip = client.handshake.address.address;
..
}
ip always returns 127.0.0.1 and this is because the server sits behind a proxy. How do I get remote address properly ?
Edit: I am using http-proxy
yes, this is working for me.
I am properly getting the remote IP address and not 127.0.0.1
In version > 1.0, the syntax is similar: