Please use this template for troubleshooting questions.
My issue: When the NGINX Ingress Controller is deployed behind reverse proxies (Azure Application Gateway, AWS ALB, etc.), the original Host header is modified to an internal service name, but the original hostname is preserved in the X-Forwarded-Host header. Currently, the controller always uses $host which contains the modified hostname, causing backend applications to reject requests (403/404) or generate incorrect URLs.
proxy_set_header X-Forwarded-Host $host;
How I encountered the problem: Hi Team,
I would like to highlight an issue we are currently facing after migrating from the Kubernetes community ingress controller (v5.4.2) to the F5 Ingress Controller.
Current Setup
We are running primary and secondary Kubernetes clusters, each with its own ingress controller.
These ingress controllers manage multiple ingress resources with configured origin domains.
The origin domains are integrated with the frontend through the Origin header configuration.
Users access the application using a single primary domain and are unaware of the backend origin domains.
Issue After Migration
After migrating to the F5 Ingress Controller, we are observing that:
The original hostname is being overridden at the ingress level.
The application is receiving backend/origin host domains instead of the original user-facing domain.
This behavior is leading to 403-level errors from the application.
Previously, with the community ingress controller, the original host header was preserved correctly.
Requirement
We need to ensure that the original host and forwarded headers are preserved when traffic is routed through the F5 Ingress Controller.
Specifically, we are looking for:
A way to pass the original host using X-Forwarded-Host / X-Forwarded-For headers
A configuration to prevent host header overwrite at the ingress level
Any recommended best practice for handling host preservation in F5 Ingress Controller setups
Could you please advise on the correct configuration or supported approach to retain the original hostname while using F5 Ingress Controller?
Thanks in advance for your support.
Solutions I’ve tried: we need to use http_X_forwaded header host
Version of NIC and/or NGINX: v5.4.1
Deployment environment: AKS