延迟的沙盒属性为iframe
我目前正在面临问题。我要二线将外部播放器(例如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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论