-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Validate x-forwarded-proto and connection scheme before redirect to https #1844
Conversation
Isn't it simpler to do |
BTW, if previous hop was https then you get no redirection if you go in with http. still broken |
Several users are sending this header so we cannot remove it. |
That can happen only if the previous hop is a load balancer and switches protocols without handling the x-forwarded-* headers. |
Just to be clear, if the previous hop is a load balancer (like an ELB):
|
I have a feeling that we're not on the same page here... This is a request path: If we use Now let's look at current code:
and how it will behave on different scenarios:
You can see that you still able to bypass redirect with HTTP request if you set XF HTTPS header |
@tpolekhin please send a PR with the change you propose. |
Which issue this PR fixes:
fixes #1841
fixes #1779