title: "Refused to display document because display forbidden by X-Frame-Options." Edit header
body: <p>I am developing an application for a social network. When I try to access it I get an error in my browser:</p>
  
  <blockquote>
    <p>Refused to display document because display forbidden by X-Frame-Options.</p>
  </blockquote>
  
  <p>This social network uses Iframe. My question is, how do I change the header to solve this problem?</p>
  
  <p>Considering <a href="https://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options">Overcoming &quot;Display forbidden by X-Frame-Options&quot;</a>, in my servlet I tried command:</p>
  
  <pre class="lang-java prettyprint-override"><code>httpServletResponse.addHeader("X-FRAME-OPTIONS", "SAMEORIGIN" ); 
  </code></pre>
  
  <p>Considering <a href="http://www.rivercitystudio.com/blog/2011/09/google-maps-embedding-x-frame-options-change/" rel="nofollow noreferrer">http://www.rivercitystudio.com/blog/2011/09/google-maps-embedding-x-frame-options-change/</a> I've also tried adding in my url the following:</p>
  
  <pre><code>&amp;output=embed
  </code></pre>
  
  <p>None of the two alternatives worked.</p>