문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top