【问题标题】:Chrome Extension content security CSP and Manifest.jsonChrome 扩展内容安全 CSP 和 Manifest.json
【发布时间】:2022-11-09 23:58:18
【问题描述】:

我创建了一个扩展程序来从网页上查找和投射视频到 Chromecast 上,它运行良好,直到最近,它停止工作了。但我不知道谷歌在谷歌浏览器上做了什么更新,但我的扩展在几周前就停止了工作。

Google 可能会在另一个时间“再次”更改安全策略。

这是我的 manifest.json 的一部分:

"content_security_policy": "script-src 'self' chrome-extension://pkedcjkdefgpdel**************imHidingthisToYou/ chrome-extension-resource: https://www.gstatic.com; object-src 'self'",
  "permissions": [
    "webNavigation",
    "https://*/*",
    "http://*/*",
    "tabs",
    "activeTab",
    "storage",
    "webRequest",
    "<all_urls>"
  ],

来自 Google 扩展程序的错误:

'content_security_policy': Ignored insecure CSP value "chrome-extension-resource:" in directive 'script-src'

来自我的 popup.html 页面的检查器控制台日志的错误:

Refused to load the script '<URL>' because it violates the following Content Security Policy directive: "script-src 'self' <URL> <URL>". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

【问题讨论】:

  • 这是您必须在crbug.com 上报告的内容。

标签: javascript google-chrome-extension content-security-policy chromecast manifest.json


【解决方案1】:

你有没有解决过这个问题?我也有同样的问题

【讨论】:

    猜你喜欢
    • 2013-02-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-24
    • 2013-12-23
    • 2021-07-30
    • 2019-07-24
    • 2015-09-02
    • 2014-06-06
    相关资源
    最近更新 更多