pbojinov / request-ip

A Node.js module for retrieving a request's IP address on the server.
https://npmjs.com/package/request-ip
MIT License
828 stars 102 forks source link

Bad extract ip from x-forwarded-for #60

Closed masak64 closed 2 years ago

masak64 commented 2 years ago

in commit https://github.com/pbojinov/request-ip/commit/89d7ff4c994f50aee13bef075f37f90ed30c95d5 change extract last ip from x-forwarded-for, bud client ip is first, spec: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For. For me this broke my app.

pbojinov commented 2 years ago

Sorry about that. I'm going to revert this change tonight and push up a new version. Will let you know shortly.

sidan5 commented 2 years ago

Breaks my app too.

ycfreeman commented 2 years ago

same here

sidan5 commented 2 years ago

@pbojinov When this is going to be resolved? Thanks!

aseyfpour commented 2 years ago

PR for fixing this issue: https://github.com/pbojinov/request-ip/pull/61

ss-tombrown commented 2 years ago

This breaks our app too!

cc @ss-sarak

aseyfpour commented 2 years ago

Using 2.1.3 version will solve the problem!

pbojinov commented 2 years ago

Fixed in version 3.0.1, just pushed it up on npm registry