简体   繁体   English

拒绝在框架中显示“https://example.tld/”,因为它将“X-Frame-Options”设置为“拒绝”

[英]Refused to display 'https://example.tld/' in a frame because it set 'X-Frame-Options' to 'deny'

I'm making a browser extension.我正在制作浏览器扩展。 I have created a popup window that is opened after the user click on a button.我创建了一个在用户单击按钮后打开的弹出窗口。 I have a form input and an iframe, I want that when the user enter an url it will be able to display it inside the iframe but I'm facing this issue我有一个表单输入和一个 iframe,我希望当用户输入一个 url 时,它能够在 iframe 内显示它,但我正面临这个问题

Refused to display 'https://discord.com/' in a frame because it set 'X-Frame-Options' to 'deny'.

A lot of websites will not load into the iframe and I'm not able to find a way to manage this.许多网站不会加载到 iframe 中,我无法找到一种方法来管理它。

What I want to achive is to have an indipendent webView that will be act like the browser and will load an url when it's inserted by the user.我想要实现的是拥有一个独立的 webView,它将像浏览器一样运行,并在用户插入时加载一个 url。 The iframe is the most flexible solution I think, but if anyone have any suggestion on how to implement this I will appreciate. iframe 是我认为最灵活的解决方案,但如果有人对如何实现这一点有任何建议,我将不胜感激。

Take a look at the X-Frame-Options header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options看看X-Frame-Options标头: https : //developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

The response header you are getting back from https://discord.com/ does not allow the browser to render it inside an <iframe> element.您从https://discord.com/返回的响应头不允许浏览器在<iframe>元素内呈现它。 This is for security reasons and you likely won't be able to find a workaround (otherwise it would be a security loophole).这是出于安全原因,您可能无法找到解决方法(否则这将是一个安全漏洞)。

暂无
暂无

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

相关问题 拒绝在框架中显示“https://www.facebook.com/”,因为它将“X-Frame-Options”设置为“拒绝” - Refused to display 'https://www.facebook.com/' in a frame because it set 'X-Frame-Options' to 'deny' Ionic 拒绝在框架中显示“https://withpersona.com/”,因为它将“X-Frame-Options”设置为“deny” - Ionic Refused to display 'https://withpersona.com/' in a frame because it set 'X-Frame-Options' to 'deny' 拒绝在框架中显示“URL”,因为它将“x-frame-options”设置为“拒绝”。 但我没有使用 iFrame - Refused to display 'URL' in a frame because it set 'x-frame-options' is set to 'deny'. But i am not using iFrame 拒绝在框架中显示Facebook URL,因为它将“ X-Frame-Options”设置为“拒绝” - Refused to display Facebook URL in a frame because it set 'X-Frame-Options' to 'deny' Facebook画布:拒绝在框架中显示应用程序,因为它将“ X-Frame-Options”设置为“ DENY” - Facebook canvas: Refused to display app in a frame because it set 'X-Frame-Options' to 'DENY' 拒绝在框架中显示&#39;,因为它将&#39;X-Frame-Options&#39;设置为&#39;DENY&#39;。 在通过jQuery加载jsp时 - Refused to display ' in a frame because it set 'X-Frame-Options' to 'DENY'. at loading jsp by jquery 拒绝显示框架,因为它在 android webview 中将 X-Frame-Options 设置为“DENY” - Refused to display a frame because it set X-Frame-Options to 'DENY in android webview 拒绝在框架中显示,因为它将“X-Frame-Options”设置为 DENY facebook fb.ui 共享方法 - Refused to display in a frame because it set 'X-Frame-Options' to DENY facebook fb.ui share method 拒绝在框架中显示,因为它在JavaScript中将“X-Frame-Options”设置为“DENY” - Refused to display in a frame because it set 'X-Frame-Options' to 'DENY' in JavaScript 谷歌浏览器拒绝显示GoogleMaps Frame,因为X-Frame-Options设置为拒绝 - Google Chrome refused to display GoogleMaps Frame because X-Frame-Options is set to deny
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM