I have one angular js application which is running on nodejs. I want to load an external site, the external site is also my application which is running on different IP, with-in a div while loading the template url. So in template url I mentioned one HTML file. Inside that HTML file I had written like this.
<iframe src="myexternalurl"></iframe>
But in error console it is coming like:
Refused to display 'myexternalurl' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
Change the x-frame-options
header to ALLOW-FROM {your app domain}
Apparently on your other application's host/server/app the header x-frame-options
set to SAMEORIGIN
you need to disable that header or correct it according to the x-frame-options
possible values: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
You can simply add following line to .htaccess
in your external site (If its your application)
Header always unset X-Frame-Options
If you want to allow some specific site. refer the below link
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options