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

Add support for HTTPS upstream, make sure to pass the upstream Host header #10

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

Conversation

Niek
Copy link

@Niek Niek commented Nov 28, 2024

This PR adds:

  • Support for HTTPS upstream URLs, e.g. when reverse proxying a Cloudflare worker or some other site that is only accessible through HTTPS
  • Pass the upstream hostname in the Host header - so the upstream server doesn't need to support the additional reverse proxy hostname

location / {
proxy_pass $upstream;
proxy_set_header Host $http_host;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of this line was to ensure we pass the same HOST to the upstream. With this change, we're always passing the HOST of the upstream itself which breaks the existing applications.

I think we may be able to do this, but we need to limit this only to HTTPS upstream. If the upstream is a plain HTTP, we need to ensure we're not changing this behavior.

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.

2 participants