Search code examples
iframex-frame-options

Refused to display 'https:/dmain.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'


I'm trying to embed iframe in my page but the iframe does not appear.

This is the code :

<div class=" row ">
 <iframe width="560" height="315" src="https://www.skyits.com/" > </iframe>
  </div>

The web.config file contains the following http Protocol tags:

 <httpProtocol>
        <customHeaders>
          <add name="Access-Control-Allow-Origin" value="*" />
          <add name="Access-Control-Allow-Headers" value="Content-Type" />
          <add name="Access-Control-Allow-Methods" value="GET,POST,PUT,DELETE,OPTIONS" />
          <add name="Access-Control-Allow-Credentials" value="true" />
          <remove name="X-UA-Compatible"/>          
          <add name="X-UA-Compatible" value="IE=edge"/>
          <add name="X-Frame-Options" value="ALLOW-FROM https://www.skyits.com/" />


        </customHeaders>
      </httpProtocol>

I was show a lot of questions like my question but no any solution works whit me!


Solution

  • You have to ask Skyits to reconfigure their server to allow your domain to place their homepage in your iframe