<p>im encountering an issue whereby ingress-nginx(reverse proxy) is not returning http response header (ETag) from application container.</p>
<p>It works fine without ingress.</p>
<p><a href="https://i.stack.imgur.com/7GDHI.png" rel="nofollow noreferrer">Missing http response header</a></p>
<p>Any help will be greatly appreciated.</p>
<p>The following is a snippet of Ingress yaml file</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ng-api-ngress
  namespace: ng-prod
  labels:
    app: numbergenerator
  annotations:
    #nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: etag
    nginx.ingress.kubernetes.io/cors-expose-headers: etag
    #nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
spec:
  rules:
  - host: kubernetes.docker.internal.api
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: ng-backend
            port:
              number: 80</code></pre>
</div>
</div>
</p>

<p>You can add this <code>Nginx ingress</code> annotation :</p>
<pre><code>nginx.ingress.kubernetes.io/server-snippet: |
      etag on;
nginx.ingress.kubernetes.io/configuration-snippet: |
      more_set_headers &quot;server: hide&quot;;
</code></pre>
<p>if Gzip is enabled Nginx ingress won't add or pass etag.</p>
<p>As much as i know etag wont generated by Nginx in reverse proxy configuration however if require you can generate and manage from backend code.</p>
