TIL that headers with underscores are ignored in Nginx by default
2025-12-30 • 1 min

Headers with underscores are dropped by Nginx by default. To prevent this behaviour, add the following configuration:

server {
    underscores_in_headers on;
}

For ingress-nginx, the following config value is required in the controller's configmap:

apiVersio: v1
kind: ConfigMap
data:
    enable-underscores-in-headers: "true"
metadata:
  name: ingress-nginx
  namespace: kube-system

# References

Edited: 2025-12-30