1

An iframe will not load its contents on my site.

I was working away in WAMP and everything was working fine now I've moved to the live server on our shared hosting and I get this error:

Refused to display '[contents of my iframe]' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

The src file for the iframe is in the same directory so i'm not sure what is causing this.

If anybody can point me in the right direction that would be great.

Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76
  • Please enable cross-origin, this must work. – Dinesh Babu Mar 08 '18 at 12:47
  • From my understanding this has to be something with the server config, as I wrote the src file and did not set anything and was working locally on WAMP unless I can set X-frame-options in my src file to something else – Paddy Hallihan Mar 08 '18 at 12:47
  • I put 'header("Access-Control-Allow-Origin: *");' in both my src file and my file containing my iframe, no difference – Paddy Hallihan Mar 08 '18 at 12:51
  • https://stackoverflow.com/questions/27358966/how-to-set-x-frame-options-on-iframe look into this you may get a solution – Dinesh Babu Mar 08 '18 at 12:53

0 Answers0