Javascript 回应谷歌图表引发内容安全策略问题
React GoogleChart在开发中运行良好,但在服务器中部署构建后,它会抛出以下错误Javascript 回应谷歌图表引发内容安全策略问题,javascript,reactjs,google-apps-script,Javascript,Reactjs,Google Apps Script,React GoogleChart在开发中运行良好,但在服务器中部署构建后,它会抛出以下错误 VM565 2.351f67d9.chunk.js:2 Refused to load the script 'https://www.gstatic.com/charts/loader.js' because it violates the following Content Security Policy directive: "script-src 'self' https://ssl.googl
VM565 2.351f67d9.chunk.js:2 Refused to load the script 'https://www.gstatic.com/charts/loader.js' because it violates the following Content Security Policy directive: "script-src 'self' https://ssl.google-analytics.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
我试过了
“内容安全策略”:“脚本src'self”https://maps.googleapis.com https://maps.gstatic.com清单文件中的;对象src“self”
及
在index.html文件中
但都不管用。我能知道我错过了什么吗?谢谢
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' data: gap: ws: ;
style-src 'self' https: *.google-analytics.com;
script-src 'self' https: *.google-analytics.com;
media-src 'none';
font-src *;
connect-src *;
img-src 'self' data: content: https: *.google-analytics.com;">