-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getRequestIP
returns the last IP address in the X-Forwarded-For
header
#588
Comments
PitsPower
changed the title
Dec 2, 2023
xForwardedFor
returns the last IP address in the X-Forwarded-For
headergetRequestIP
returns the last IP address in the X-Forwarded-For
header
the problem is that we use the pop method to retrieve the last one in the list.
the solution is that we are another argument to select the position we want. example :
|
8 tasks
Thanks for report.Issue is fixed in nightly channel and soon released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Node: v18.16.0
h3 1.9.0
Reproduction
Call
getRequestIP(event, { xForwardedFor: true })
in an application behind a proxy server.Describe the bug
When calling
getRequestIP(event, { xForwardedFor: true })
, the last IP address in the list is returned instead of the first one (the client's IP address), when I assume the first one should be.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: