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

Preserve X-Forwarded-Host in Ingress #7555

Open
shaun-nx opened this issue Mar 25, 2025 · 1 comment
Open

Preserve X-Forwarded-Host in Ingress #7555

shaun-nx opened this issue Mar 25, 2025 · 1 comment
Labels
area/ingress Issues related to changes in `kind: Ingress` proposal An issue that proposes a feature request ready for refinement An issue that was triaged and it is ready to be refined

Comments

@shaun-nx
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If I have an Ingress Resource deployed, and I send a request with X-Forwarded-Host header, the value in the header is not preserved

Describe the solution you'd like
The command below should return ‘bogus.example.com’:

$ curl --header "X-Forwarded-Host: bogus.example.com"  https://www.example.com
            "x-forwarded-host": "bogus.example.com",
            "host": "www.example.com"

Instead, it returns ‘www.example.com’ for both ‘x-forwarded-host’ and ‘Host’:

$ curl --header "X-Forwarded-Host: bogus.example.com"  https://www.example.com
            "x-forwarded-host": "www.example.com",
            "host": www.example.com

Describe alternatives you've considered
We would have to create a custom annotation, which is less than desirable

Additional context
N/A

@shaun-nx shaun-nx added proposal An issue that proposes a feature request ready for refinement An issue that was triaged and it is ready to be refined labels Mar 25, 2025
@shaun-nx shaun-nx moved this from Todo ☑ to Prioritized backlog in NGINX Ingress Controller Mar 25, 2025
Copy link

Hi @shaun-nx thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@shaun-nx shaun-nx added the area/ingress Issues related to changes in `kind: Ingress` label Mar 28, 2025
@shaun-nx shaun-nx modified the milestone: v4.3.0 Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ingress Issues related to changes in `kind: Ingress` proposal An issue that proposes a feature request ready for refinement An issue that was triaged and it is ready to be refined
Projects
Status: Prioritized backlog
Development

No branches or pull requests

1 participant