简体   繁体   中英

chrome extension Content Security Policy1

I have this error in implementing chrome extension. Refused to load the script 'https://apis.google.com/js/platform.js' because it violates the following Content Security Policy directive: "script-src 'self' https://apis.google.com/js/api.js 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

In Chrome Extension manifest v3 remotely hosted code is no longer allowed . And inline scripts.

Pls see How can I use the Google API in a chrome extension? for workarounds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM