-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Avoid X-Forwarded-Host to be copied to Host header #3814
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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/test-infra repository. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: paovitali If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@paovitali unfortunately we can not just drop support for I've an open PR to do this via Lua: https://github.com/kubernetes/ingress-nginx/pull/3798/files#diff-d2d9d7b4e27b247474196438a3dfbdc3R76, but there's a pushback on the amount of Lua we use - so it's not clear if we will continue with that PR. |
/check-cla |
@ElvinEfendi You are right, I added a splitted config to address the missing behaviour. I noticed (and referenced in PR message) your previous work with Lua on a prior PR, but as I saw it required some rethinking I wanted to do it via template too in the meantime |
@paovitali now that the referenced Lua PR is merged, how about #3950? |
@ElvinEfendi great, looking forward to test it 🍺 |
What this PR does / why we need it: This PR reviews nginx template in order to avoid the overwriting of
Host
header with the values inherited fromX-Forwarded-Host
. The related variable assignment map has been deleted together with the relatedbest_http_host
assigment within theUseForwardedHeaders
conditional. Nowbest_http_host
gets populated only once with the right value independently from the usage ofX-forwarded-*
headers through related cfm key.Which issue this PR fixes: fixes #3790
Special notes for your reviewer: Another PR has been submitted concerning this issue (#3798) which involves Lua migration of part of nginx template logic. As that one covers a lot more aspects, this PR is intended only to provide a behaviour fix while bigger WIP will be implemented :)