首页 > 解决方案 > Tampermonkey 添加 iframe 问题 - 对服务器的请求已被扩展程序阻止

问题描述

我想在特定的 URL 上添加 iframe,一切正常,但未加载 iframe 内容。在 iframe 中,我看到消息“对服务器的请求已被扩展程序阻止”。

在此处输入图像描述

我禁用了所有其他扩展(除了 Tampermonkey)。显然,Tampemonkey 出于某种原因阻止了这种行为。知道怎么做吗?

在 JS 控制台中,我看到:

chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/:1 Refused to frame 
'https://xyz123.com/' because it violates the following Content Security 
Policy directive: "child-src 'self' docs.google.com fast.wistia.net 
js.stripe.com platform.twitter.com player.vimeo.com staticxx.facebook.com 
www.facebook.com web.facebook.com www.youtube.com". Note that 'frame-src' was 
not explicitly set, so 'child-src' is used as a fallback.

标签: iframetampermonkey

解决方案


推荐阅读