Show Iframe inside ionic app


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


It’s a server thing:

1 Like

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?

I would just use “*” , but if its important that no other website could embed your content You have to come up with another solution.