小杰董花花 (@yanjieyanji) 在 chrome130以上版本,插件遇到了CSP限制,求解决方案 中发帖
问题
chrome 升级到130.0.6723.70后,之前工作正常的插件遇到了CSP(Content Security Policy)限制问题
报错日志:
Refused to load the script ‘chrome-extension://***.js’ because it violates the following
Content Security Policy directive: “script-src ‘self’ ‘wasm-unsafe-eval’ ‘inline-speculation-rules’”.
Note that ‘script-src-elem’ was not explicitly set, so ‘script-src’ is used as a fallback.
日志中错误堆栈跟踪到编译后的文件
(async () => {
...