I am Hack Sparrow
Captain of the Internets.

Node.js get IP Address

Getting a user's IP address seems pretty straightforward in Node.js, right? Does it need a special post on my blog? Yes it does, we'll find out why in a few seconds. Conventional wisdom says, this is how you would get the IP address from a request: [code] var ip = req.connection.remoteAddress; [/code] But there is a problem. If you are running your app behind Nginx or any proxy, every single IP addresses will be 127.0.0.1 :D Probably you can see the problem now. So wha ...