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:

Post a Comment

Note: Only a member of this blog may post a comment.