【问题标题】:chrome extension Content Security Policy1chrome 扩展内容安全策略1
【发布时间】:2021-09-24 14:22:06
【问题描述】:

我在实现 chrome 扩展时遇到了这个错误。 拒绝加载脚本“https://apis.google.com/js/platform.js”,因为它违反了以下内容安全策略指令:“script-src'self'https://apis.google.com/js/api.js'unsafe-inline''unsafe-评估'”。请注意,'script-src-elem' 没有显式设置,因此 'script-src' 用作备用。

【问题讨论】:

    标签: angular google-chrome


    【解决方案1】:

    在 Chrome 扩展清单 v3 remotely hosted code is no longer allowed 中。和内联脚本。

    请参阅How can I use the Google API in a chrome extension? 了解解决方法。

    【讨论】:

      猜你喜欢
      • 2013-02-01
      • 2013-12-23
      • 1970-01-01
      • 2014-06-06
      • 2014-10-26
      • 1970-01-01
      • 2020-02-28
      • 2012-09-10
      • 1970-01-01
      相关资源
      最近更新 更多