1

I am using i-frame to import html file from another domain, however I get this error saying Refused to display 'url' in a frame because it set 'X-Frame-Options' to 'sameorigin'. Can you please help me to avoid the exception?

  • Possible duplicate of [Overcoming "Display forbidden by X-Frame-Options"](http://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options) – Kyle B Apr 11 '17 at 17:09

2 Answers2

0

X-Frame-Options is a HTTP Header that prevents a URL from being viewed from within an IFrame. The only way to fix this is to change the X-Frame-Options header from the server that is serving the page you want to display within an IFrame.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Kyle B
  • 2,328
  • 1
  • 23
  • 39
0

The setting has to be done at the web-server level (apache, IIS, etc). This link will give you details on this - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Rupesh Jain
  • 168
  • 3
  • 11