简体   繁体   English

有没有一种方法可以渲染具有X-Frame-Options的网页:在带有reactjs的标题响应中拒绝

[英]is there a way to render a web page that has X-Frame-Options: deny in its header response with reactjs

I want to render a web page that has X-Frame-Options: deny in a React app. 我想渲染一个带有X-Frame-Options: deny的网页X-Frame-Options: deny在React应用程序中X-Frame-Options: deny I think I can't use <iframe> , so I'm searching for way to render the page with something else. 我想我不能使用<iframe> ,所以我正在寻找用其他东西渲染页面的方法。 I cannot make changes on the server side of this page, so I can't remove the X-Frame-Options: deny . 我无法在此页面的服务器端进行更改,因此无法删除X-Frame-Options: deny What are my options? 我有什么选择?

You can try to fetch the page as html and use dangerouslySetInnerHTML . 您可以尝试将页面fetch为html并使用dragonallySetInnerHTML But even if it is not blocked by some other header the result will be buggy and will have limited functionality. 但是,即使它没有被其他标头阻止,结果仍将是错误的,并且功能有限。

I think it is not possible without some browser extension or proxy server which modifies those headers. 我认为如果没有一些浏览器扩展程序或代理服务器来修改这些标头,这是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM