Sunday, October 4, 2015

Node.js: How to get client's IP address

var ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;

No comments: