Chrome 扩展拒绝加载脚本

问题描述 投票:0回答:0

我的 chrome 扩展程序出现错误,我不知道是什么原因。

》拒绝加载脚本 'https://cdn.jsdelivr.net/npm/@supabase/[email protected]' 因为它 违反了以下内容安全策略指令:“script-src 'self'”。请注意,未明确设置“script-src-elem”,因此 'script-src' 用作后备。 “

和“拒绝加载脚本 'https://cdn.jsdelivr.net/npm/@supabase/[email protected]' 因为它 违反了以下内容安全策略指令:“script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*"。注意 'script-src-elem' 没有明确设置,所以'script-src'被用作后备。 “

这是我的 manifest.json 文件:

{ "manifest_version": 3, "name": "My extension", "version": "0.0.1", "permissions": [ "activeTab", "tabs", "identity" ], "background": { "service_worker": "app.js" }, "action": { "default_title": "My extension", "default_popup": "popup.html", "default_icon": { "16": "/icons/16.png", "48": "/icons/48.png", "128": "/icons/128.png" } }, "content_scripts": [ { "matches": ["<all_urls>"], "css": [], "js": ["popup.js"], "run_at": "document_end" } ], "host_permissions": [ "https://*.supabase.co/*" ] }

我尝试了很多东西,但我找不到我正在尝试做的事情的文档。我不知道需要哪些权限。我几乎找不到在清单 v3 chrome 扩展上进行身份验证的指南。

google-chrome-extension manifest chrome-extension-manifest-v3
© www.soinside.com 2019 - 2024. All rights reserved.