Skip to content

Comments

Fix X-Forwarded-For for IPv4 with dual stack sockets #2399#2400

Merged
MihaZupan merged 2 commits intodotnet:mainfrom
hacst:xff-hybrid-ipv4-fix
Feb 15, 2024
Merged

Fix X-Forwarded-For for IPv4 with dual stack sockets #2399#2400
MihaZupan merged 2 commits intodotnet:mainfrom
hacst:xff-hybrid-ipv4-fix

Conversation

@hacst
Copy link
Contributor

@hacst hacst commented Feb 15, 2024

Fixes #2399 . As discussed there checks whether the RemoteIpAddress is a IPv4-Mapped IPv6 Address and maps it back to a real IPv4 address before turning it into a string for the X-Forwarded-For header.

Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RequestHeaderXForwardedForTransform attaches IPv4-Mapped IPv6 Addresses to X-Forwarded-For in dual stack settings

3 participants