延迟的沙盒属性为iframe

发布于 2025-02-01 23:00:27 字数 434 浏览 2 评论 0原文

我目前正在面临问题。我要二线将外部播放器(例如DOOD流,Vtube等)嵌入我的ReactJS应用中,但是这些玩家有很多烦人的广告...因此我尝试用某些方法阻止外部链接,但它无法正常工作...

我尝试的是:

  • Sandbox iframe,但检测
  • 到用PHP脚本作为prixy => JS脚本由于CORS不加载而
  • 编辑IFRAME =&gt中的DOM;由于XSS安全性
  • 反向工程师不起作用的脚本检测Sandbox属性=>它看起来围绕窗口内的“沙盒”属性。parent和window
  • 。 实际上检测到的沙盒

,我正在尝试在加载iframe后几秒钟添加沙盒属性,嵌入式玩家没有检测到它,但是,iFrame却没有打磨,并且广告继续弹出...有人可以解释我为什么Sandbox属性加载iframe后不考虑吗?

I'm currently facing to a problem. I'm triyng to embed an external player (like dood stream, vtube, etc) into my Reactjs app but these players have so many annoying ads... So i tried to block external links with some methods but it's not working...

What I tried :

  • Sandbox the iframe but detected
  • Parsing the html with a PHP script as proxy => JS script not loading because of CORS
  • Edit the DOM inside the iframe => not working because of XSS security
  • Reverse engineer the script that detect the sandbox attributes => It looks about the "Sandbox" attribute inside the window.parent and window.top
  • Try with nested iframes/embed tag/obj tag etc. => sandbox detected

Actually, I'm trying to add sandbox attribute some seconds after the iframe is loaded, the embedded players does not detect it but, the iframe is not sandboxed and ads continue to pop... Someone can explain me why the sandbox attribute is not considered after the iframe is loaded ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文