x-forwad-proto header is not forwarded correctly to authentication service
See original GitHub issueDescribe the bug
We use datawire ambassador behind nginx as an ingress controller. Since Nginx does the tls termination there is already an x-forwad-proto
header set when the request hits ambassador.
If the request is now forwarded to our authentication service the value of this header changes from https
to http
.
To Reproduce
Deploy an Authentication Service like described here https://www.getambassador.io/user-guide/auth-tutorial/#1-deploy-the-authentication-service but with ambassador behind nginx as ingress controller doing also tls termination.
Expected behavior
x-forward-proto
should not be changed and forwarded with the correct value https
to the authentication service.
Versions
- Ambassador: 0.50.rc
- Kubernetes environment bare metal
- Version 1.13.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
x-forwad-proto header is not forwarded correctly to ... - GitHub
From looking at this thread, it appears that only the authentication gets the "correct" header (https), but upstream services still see http. In ......
Read more >x-forwad-proto header is not forwarded correctly to authentication ...
Describe the bug. We use datawire ambassador behind nginx as an ingress controller. Since Nginx does the tls termination there is already an...
Read more >Using the Forwarded header - NGINX
Traditionally, an HTTP reverse proxy uses non-standard headers to inform the upstream server about the user's IP address and other request properties:.
Read more >X-Forwarded-Proto - HTTP - MDN Web Docs
The X-Forwarded-Proto (XFP) header is a de-facto standard header for identifying the protocol (HTTP or HTTPS) that a client used to connect ...
Read more >asp.net header forwarding not working for external Identity ...
After some digging I found the mistake: I did add the wrong proxy IP. Since my asp.net app is hosted on docker, I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
From looking at this thread, it appears that only the authentication gets the “correct” header (https), but upstream services still see http.
In our case, we use fly.io’s wormhole to do edge ssl termination which forwards requests to port 80 within ambassador. We would except the x-forwarded-proto to respect the original proto header, but it is changing it to http.
The headers we received in 0.40.2 looked like:
However, the headers in all of the 0.50.0-* releases look like (this is 0.50.0-rc5):
Is this by design?
@gsagula, can you speak to this?