Redirect to external link in browser
-
Hi! I have a task: there is a redirect from the application to the site page. How to make this page open in the application? I tried to use <iframe> It opens the pages for youtube and others, but it’s exactly my link is forbidden. Error: Refused to display ‘https://someurl’ in a frame because it set ‘X-Frame-Options’ to ‘deny’. Are there any other ways besides <iframe>?
-
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
If you specify deny, not only will attempts to load the page in a frame fail when loaded from other sites, attempts to do so will fail when loaded from the same site. On the other hand, if you specify sameorigin, you can still use the page in a frame as long as the site including it in a frame is the same as the one serving the page.
-
This post is deleted! -
@Hawkeye64 thanks for the answer) it needs to be configured on the backend. I don`t have access to the backend. maybe you know other ways?
-
@nomad There is no other way. Browsers respect the wishes of sites. However, okay, there is one way. You build a node backend, that fetches (because it’s your code, you don’t have to respect anything) and feed it to your front-end.