title: How to Set Security Headers in Nginx Conf
body: <p>I added the following header in Nginx conf</p>
  <p><code>add_header X-Frame-Options “SAMEORIGIN”</code> and then it's working fine.</p>
  <p><a href="https://i.stack.imgur.com/znxgX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/znxgX.png" alt="enter image description here" /></a></p>
  <p>Then I added another header like this</p>
  <pre><code>add_header X-Frame-Options “SAMEORIGIN”
  add_header X-XSS-Protection &quot;1; mode=block&quot;;
  
  </code></pre>
  <p>But the <code>X-XSS-Protection</code> is not getting reflected in the Response Headers, only <code>X-Frame-Options</code> is getting added.
  Then I removed the <code>X-Frame-Options</code> from the Nginx conf file, then also it is showing the <code>X-Frame-Options</code> in the Response Headers but not the other one.
  I am not sure if Nginx cached the previous conf file or it is happening due to some other configurations.</p>