最近,我创建了一个chrome扩展程序,可以将视频投射到chromecast上,它工作正常,但现在停止工作并显示此错误。
拒绝加载脚本'chrome-extension://pkedcjkdefgpdelpbcmbmeomcjbeemfm/cast_sender.js',因为它违反了以下内容安全策略指令:“ script-src'self'https://www.gstatic.com”。
浏览器控制台中的错误:
这是清单
{
"background": {
"page": "html/background.html"
},
"browser_action": {
"default_icon": "images/download_inactive.png",
"default_popup": "html/popup.html",
"default_title": "extension name"
},
"content_scripts": [ {
"all_frames": true,
"js": [ "js/jquery-3.1.1.min.js", "js/contentscript.js" ],
"matches": [ "*://*/*" ],
"run_at": "document_end"
} ],
"content_security_policy": "script-src 'self' https://www.gstatic.com; object-src 'self' https://ssl.google-analytics.com;",
"description": "extension description",
"icons": {
"128": "images/logo.png"
},
"manifest_version": 2,
"name": "extension name",
"permissions": [ "cookies","activeTab", "tabs","proxy", "webRequest", "webRequestBlocking", "storage", "http://*/*", "https://*/*" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "2.0.9",
"web_accessible_resources": [ "*" ],
//"options_page": "html/options.html"
"options_ui": {
"page": "html/options.html",
"open_in_tab": false
}
}