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

Make nginx dev config respect forwarded proto. #171

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

Conversation

lrowe
Copy link
Member

@lrowe lrowe commented Mar 16, 2019

This allows proxying from another nginx server useful when wanting to expose current development intstance through a cloud instance.

This allows proxying from another nginx server useful when wanting to expose current development intstance through a cloud instance.
@@ -11,6 +11,12 @@ http {
server 127.0.0.1:6543;
keepalive 10;
}

map $http_x_forwarded_proto $forwarded_proto {
Copy link
Member

Choose a reason for hiding this comment

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

if I follow this it is just saying to use http/https based on value of http_x_forwarded_proto or scheme. Although I am not sure how these are set.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. It's using the X-Forwarded-Proto header if it exists and the scheme if it doesn't. That header is set by a downstream proxy server (in my case the Google Cloud Integrated Authentication Proxy I use for authentication.) I needed this so I could test my authentication setup locally.

@hitz
Copy link
Member

hitz commented Feb 6, 2020

@lrowe @stuartmiyasato @caseylitton @cricketsloan I think we have pulled nginx.conf out of everything and besides we don't use nginx->snovault. So I think this should be rejected? Convince me otherwise.

@lrowe
Copy link
Member Author

lrowe commented Feb 7, 2020

This nginx-dev.conf is only used in development when running bin/dev-servers. The change is only really applicable when you're developing authentication stuff, in my case I had the Google Cloud Auth proxy in front of cloud instance and wanted to proxy back to my local development machine over an ssh tunnel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants