0

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'.
Maxim
  • 9,701
  • 5
  • 60
  • 108
Mohan Raja
  • 129
  • 1
  • 13

2 Answers2

0

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

gabeio
  • 1,282
  • 1
  • 23
  • 37
0

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

Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67