-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
NGINX: add X-Original-Forwarded-Host header #12999
base: main
Are you sure you want to change the base?
NGINX: add X-Original-Forwarded-Host header #12999
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hi @clementnuss. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: clementnuss The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
03df00f
to
095d039
Compare
I modified a series of test that were using the logic can be checked here: https://go.dev/play/p/cgkKxJZtCCp in the current state I believe that the tests should pass, the one that failed looks like a false positive to me. also sorry for abusing github action to run the tests, but locally on my arm64 mac it was complicated to run the e2e tests. |
adds the equivalent of the existing X-Original-Forwarded-For header but for the X-Forwarded-Host instead. helps in the context of configuration snippet deprecations, as there is currently no safe way to add this header when it was already set upstream Signed-off-by: Clément Nussbaumer <[email protected]>
Signed-off-by: Clément Nussbaumer <[email protected]>
095d039
to
6f0114d
Compare
hi @Gacko sorry for the ping, I would just need to know whether there's a chance this PR gets merged or not (even if it only lands in 1.13). then based on your feedback, we will have to decide wether we keep allowing configuration snippet as fallback 😟 to generate this also please let me know if it needs more tests or anything else. |
adds the equivalent of the existing X-Original-Forwarded-For header but for the X-Forwarded-Host instead.
typically helps in the context of configuration snippet deprecation, as there is currently no safe way to add this header when it was already set upstream
What this PR does / why we need it:
with nginx controller version 1.12.0, configuration snippets are considered Critical per default and not allowed anymore. as a result, some users who relied on config snippets to set an
X-Original-Forwarded-Host
header are left without a solution.this PR adds the
X-Original-Forwarded-Host
per default, akin to the existingX-Original-Forwarded-For
header. Those headers are used to pass the originalX-Forwarded-{For,Host}
further to the upstream.ℹ️ it would be nice to cherry-pick this commit back to release/v1.12 if it gets merged.
Types of changes
How Has This Been Tested?
I tested the implementation locally and added an e2e test to cover this new header.
Checklist: