Question

I've an app, which loads data from database. In a table I'm storing some URLs EX: https://facebook.com. Remember these URLs are dynamic and are controlled in admin panel.

Now, I need to get contents of these URLs and display it inside iFrame or inside a div within my app. Idea here is user should not go away from my app.

When I tried to load https://facebook.com it never loads because they've (X-Frame-Options) enabled.

Is there any solution for this?

Was it helpful?

Solution

You cannot tell the browser to ignore the security instructions provided by the third party site. That would defeat the object of having them in the first place.

If you want to display the content on your site, then you will have to display it from your own server (e.g. by using a server side process to read the data from the third party site and serve it from your own). Obviously, this will mean that you cannot (for example) load Facebook using the user's own credentials.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top