<p>I have ASP.NET WebApi project, which return security headers on each request:</p>

<p><a href="https://i.stack.imgur.com/F7pX3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/F7pX3.png" alt="enter image description here"></a></p>

<p>When I run this app in Kubernetes cluster with Ingress NGINX, my headers are missed</p>

<p><a href="https://i.stack.imgur.com/Gew5r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Gew5r.png" alt="enter image description here"></a> </p>

<p>How I can configure NGINX to use response headers from my application? Why Ingress NGINX removes my response headers?</p>

<p>I don't have any experience with NGINX configuration. Please suggest how to do that in k8s cluster. Thanks </p>

Я TChebur
<p>Use following annotations in your ingress to set response header</p>

<pre><code>    nginx.ingress.kubernetes.io/configuration-snippet: |
      more_set_headers "X-Frame-Options: Deny";
      more_set_headers "X-Xss-Protection: 1; mode=block";
      more_set_headers "X-Content-Type-Options: nosniff";
</code></pre>
