<p>I have a problem with headers not forwarded into my services, I am not sure how support for Ingress was added, however I have the following Ingress service:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
    "nginx.org/proxy-pass-headers": "custom_header"
spec:
  rules:
  - host: myingress.westus.cloudapp.azure.com
    http:
      paths:
      - path: /service1
        backend:
          serviceName: service1
          servicePort: 8080
</code></pre>

<p>However, my custom_header will not be forwarded. In nginx I set underscores_in_headers:</p>

<pre><code>underscores_in_headers on;
</code></pre>

<p>How can I add this configuration into my ingress nginx service?</p>

<p>Thanks.</p>

<p>I've just changed &quot;true&quot; instead of &quot;on&quot;, for nginx ingress controller , and workd for me .
As mentioned here : <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</a></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configuration
  namespace: ingress-nginx
  labels:
    app: ingress-nginx
data:
  enable-underscores-in-headers: &quot;true&quot;
</code></pre>
<p>kubectl apply -f configmap.yml</p>
<p><a href="https://i.stack.imgur.com/1RBPi.png" rel="nofollow noreferrer">enter image description here</a></p>
