Azure / Azure/aks-app-routing-operator

feature request: allow configuration of use-forwarded-headers

Open
#489 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40
Forks
31
PR merge metrics
No merged PRs in 30d

Description

Currently, nginx always replaces the x-forwarded-host header with the host name specified in the ingress.

Setting the use-forwarded-headers: "true" annotation has no effect on this behavior.
Setting use-forwarded-headers: "true" in the nginx ConfigMap works, but is not supported.

It would be great if there was an officially supported method to prevent nginx from replacing x-forwarded-* headers.

Use case:
We have a multi tenant SaaS product. Each tenant has custom domains to access our product, for example customer1.idp.ourproductname.cloud. When this domain is accessed, the request is first processed by Azure API Management, and then forwarded to our AKS cluster with x-forwarded-host set to customer1.idp.ourproductname.cloud. When nginx then forwards the request to our application running in AKS, the x-forwarded-host is replaced so that our service cannot identifiy the tenant for this request any more.

Possible solutions:
- allow setting use-forwarded-headers in ingress annotations
- add use-forwarded-headers setting to NginxIngressController

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how ingress annotations and the Nginx ConfigMap are handled, then inspect the NginxIngressController configuration path. Compare the existing unsupported use-forwarded-headers setting with the proposed annotation or controller setting. Done means an officially supported configuration prevents nginx from replacing x-forwarded-* headers.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, nginx
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.