Skip to content
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

AspNet Request-Ip with support for CheckForwardedForHeaderOffset #923

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

bakgerman
Copy link
Contributor

At the firm I work for, the network engineers have not followed X-Forwarded-For HHTP headers standards.
Instead of having the desired client IP at the start of the list of IP addresses in the header, the client IP is the second or third element, depending upon whether you are in development, test, or production network.

One way to solve this is to add an int Index property to the layout renderer.

…ded-For headers where the desired client IP is NOT at the start of the comma separated list
…lient IP at end, or at 2nd to end, etc of the header
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 20, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@snakefoot snakefoot merged commit 4d236ca into NLog:master Jan 23, 2023
@snakefoot snakefoot changed the title Handle malformed X-Forwarded-For Header AspNet Request-Ip with support for CheckForwardedForHeaderOffset Jan 23, 2023
@bakgerman bakgerman deleted the remote-ip-index branch January 23, 2023 22:07
@snakefoot snakefoot added this to the 5.2.2 milestone Feb 17, 2023
@snakefoot
Copy link
Contributor

snakefoot commented Feb 17, 2023

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

Successfully merging this pull request may close these issues.

2 participants