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

ProxyFixMiddleware: Turns out GCP LBs and possibly AWS LBs only have one value in x-forwarded-proto #242

Open
nabheet opened this issue Jun 13, 2024 · 1 comment

Comments

@nabheet
Copy link

nabheet commented Jun 13, 2024

I am not sure about the best way to handle this test case if there are multiple IPs in X-Forwarded-For but only one value in X-Forwarded-Proto (or not the same amount).

In GCP, X-Forward-Proto always has only one value.

image

In AWS, X-Forwarded-Proto always has only one value.

image
@nabheet
Copy link
Author

nabheet commented Jun 13, 2024

Looks like MDN also assumes single value.

Wondering if the best way to handle it is to use the hops if that many values exist, otherwise default to the first one from the left. Or if we have hops set to 5, but only 4 x-forwarded-proto headers exist, maybe use the first one from the left as that would be the last one from the right. Man this is so confusing!!! 😄

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

No branches or pull requests

1 participant