Content Security Policy: cannot load Google API in Chrome extension

前端 未结 3 2174
暖寄归人
暖寄归人 2020-12-13 19:03

This is relative an Chrome extension. I am trying a simple one which uses the Google Chart API

I have this code in my html document \"popup.html\", which is loaded o

3条回答
  •  我在风中等你
    2020-12-13 19:18

    I get this error [Report] when I run Augury chrome extension to debug an Angular app. Disable the extension and the error goes away. This won't help people who are writing extensions, but it may help those that aren't.

    [Report Only] Refused to load the script 'https://apis.google.com/js/googleapis.proxy.js?onload=startup' because it violates the following Content Security Policy directive: "script-src 'report-sample' 'nonce-EagvF0PX1Z3gVL2Dka1hbA' 'unsafe-inline' 'strict-dynamic' https: http:". 'strict-dynamic' is present, so host-based whitelisting is disabled. Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
    

提交回复
热议问题