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

Fix whitespace handling in X-Forwarded-For header parsing #228

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adam-p
Copy link

@adam-p adam-p commented Mar 27, 2022

Fixes #227

Summary of Changes

  1. Split X-Forwarded-For using space rather than comma-space.
  2. Trim whitespace from resulting value.
  3. Add tests. (Including for Forwarded parsing, which didn't have this problem.)

@adam-p
Copy link
Author

adam-p commented Mar 27, 2022

I don't know how to interpret the CircleCI failure.

@amustaque97
Copy link

@adam-p thank you for working on this. In order to fix the pipeline issue. You need to add line //go:build go1.8 at the top of the file handlers_go18_test.go in the project.

@coreydaley
Copy link
Contributor

@adam-p If you would resolve the conflict with this pull request we can get it reviewed and merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

[bug] ProxyHeaders XFF parsing handles whitespace incorrectly
3 participants