我们为Google Chrome,Firefox和Safari开发了浏览器扩展程序。我们的扩展程序在Gmail,Yahoo Mail,Hotmail和AOL Mail中显示iframe。 iframe是从外部HTTPS网站(例如https://ws-web.appspot.com/login#5635505603477504
)加载的,其中该号码是用户的ID,并且将根据用户进行更改。我们希望对Google的收件箱(在Chrome中)执行相同操作,但是当我们在收件箱中打开iframe时,我们会在控制台中收到此错误消息:
Refused to frame 'https://ws-web.appspot.com/login#5635505603477504' because it violates the following Content Security Policy directive: "frame-src https://*.talkgadget.google.com/ 'self' https://talkgadget.google.com https://accounts.google.com/ https://ssl.google-analytics.com/ https://feedback.googleusercontent.com/resources/ https://www.google.com/tools/feedback/ https://plus.google.com/ https://docs.google.com/ https://clients5.google.com/pagead/drt/dn/ https://clients5.google.com/ads/measurement/jn/ https://clients6.google.com/static/ https://mail.google.com/mail/ https://mail-attachment.googleusercontent.com/attachment/".
iframe的正文是空的。此错误仅在收件箱中发生,而不在上述其他网站中发生。是否可以修复此错误并在收件箱中显示iframe?
修改:我尝试在"https://ws-web.appspot.com/*"
中将"web_accessible_resources"
添加到manifest.json
,但它并没有解决问题。