Tuesday 30 May 2017

Is there any reason to not use "req.ip" to get the user's IP address?

Hi allLooking at stackoverflow I see many posts recommending people to use req.headers['x-forwarded-for'] or req.connection.remoteAddress to get a user's IP address, however Express comes with req.ip and req.ips to do just this.Is there a reason to avoid req.ip and req.ips?Thanks

Submitted May 30, 2017 at 10:29AM by just_tech_stuff

No comments:

Post a Comment