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

Update Request.zep #16639

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

Update Request.zep #16639

wants to merge 1 commit into from

Conversation

zikezhang
Copy link
Contributor

enhance getScheme() function.

Hello!

  • Type: bug fix | new feature | code quality | documentation
  • Link to issue:

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Small description of change:

Thanks

enhance getScheme() function.
@raicabogdan
Copy link

Unfortunately this is not that simple, it also needs a way to be able to accept reading the header only from specific trusted proxies, you can't just take the forwarded_proto header and use it as a last resort like that without verifying you trust that header.

Dealing with proxies needs to be careful and I would rather leave this into the control of the proxy backend, or in this case the origin server to read the header and update it for us. But this can be taken into v6 I believe, it is worth having a way to detect if this is a proxy and work with it.

@elcreator
Copy link

I think this should not be implemented this way as local environment setup for testing the load balancer can also be plain HTTP and we should not confuse developers who will receive SSL error instead of response.
X-Forwarded-Proto is about scheme browser use to connect to the load balancer (if it exists) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto .

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.

3 participants