title: How to add "X-Frame-Options" header in .htaccess file to protect against 'ClickJacking' attacks
body: <p>I have a Coldfusion Web application. To protect my site from Cross-Frame Scripting attack I'm planning to add a HTTP Response Header "X-Frame-Options" with a value of "SAMEORIGIN" in my '.htaccess file'. This is the article I'm referring:</p>
  
  <p><a href="https://geekflare.com/secure-apache-from-clickjacking-with-x-frame-options/" rel="nofollow noreferrer">https://geekflare.com/secure-apache-from-clickjacking-with-x-frame-options/</a>,
  <a href="https://www.garron.me/en/bits/apache-htaccess-add-cache-control-header-file-type.html" rel="nofollow noreferrer">https://www.garron.me/en/bits/apache-htaccess-add-cache-control-header-file-type.html</a></p>
  
  <p>Below code doesn't worked.</p>
  
  <pre><code>&lt;FilesMatch "\.(cfm)$"&gt; 
  &lt;ifModule mod_headers.c&gt; Header append X-FRAME-OPTIONS 'SAMEORIGIN'&lt;/ifModule&gt; 
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <hr>
  
  <p>I am new to this, can somebody please help how to do it correctly.</p>
  
  <p>Thanks in advance.</p>