Hi Team,
I am migrating from a standard Kubernetes Ingress controller to Contour v1.33.2. My upstream application is a Spring Boot service.
When a client sends duplicate Content-Type headers (e.g., two instances of application/json), Envoy merges them into a single comma-separated string: application/json,application/json.
This causes the Spring application to crash with an org.springframework.http.InvalidMediaTypeException because it cannot parse the comma-separated value as a valid MimeType.
The Problem:
Even when using requestHeadersPolicy to remove and then set the header, the backend still receives the merged/invalid string. It appears the header manipulation is not successfully overriding the merged Envoy string before it reaches the upstream service.
Config Used:
yaml
requestHeadersPolicy:
remove:
- Content-Type
set:
- name: Content-Type
value: application/json
I would like to how can we fix this issue in contour, as we did not face this issue in existing k8s ingress controller.
i have contour, envoy running as deployment and certgen job fyi in terms of env set up.