我正在尝试创建一个使用google earth API的打包应用。但是,在运行应用程序时,我收到一条错误消息:
Refused to load the script 'https://www.google.com/jsapi' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
所以我在清单中添加了一行
"content_security_policy": "script-src 'self' https://www.google.com/jsapi; object-src 'self'",
然而,现在chrome抱怨并显示以下错误:
There were warnings when trying to install this extension:
'content_security_policy' is only allowed for extensions and legacy packaged apps, and this is a packaged app.