Hi,
I’m trying to show an iFrame into a ion-content of a page.
Like this:
<iframe width="100%" height="100%" src="url"></iframe>
When open the page the console returns the error
Refused to display ‘url’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.
I’ve tried to add a proxy on the ionic.config.json file and use it into iframe src but it not works.
How can I use an iframe in ionic3 3.9.2
Thanks
It’s a server thing: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
Then, Its posible to SET X-Frame-Options to ALLOW FROM: …?
Wich would be the origin of an Ionic App to set into ALLOW FROM? If the app runs into ionic serve o ionic run -l it should be localhost but wich one would be into a real device?
ionic serve
ionic run -l
I would just use “*” , but if its important that no other website could embed your content You have to come up with another solution.