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
823 stars 102 forks source link

Wrong Client Ip address been picked in your recent version #57

Closed stevonjugush closed 2 years ago

stevonjugush commented 2 years ago

According to this documentation (x-forwarded-for), the order of ip addresses in the x-forwarded-for header is:

X-Forwarded-For: <client>, <proxy1>, <proxy2>

From your documentation, you have highlighted that you pick the last one which conflicts with where the client ip is

image
sidan5 commented 2 years ago

This duplicates https://github.com/pbojinov/request-ip/issues/60

pbojinov commented 2 years ago

Thank you for your patience all and sorry about that!

Fixed in v3.0.1 that was just released.

stevonjugush commented 2 years ago

Thanks @pbojinov.