I am trying to build a Chrome Extension that will interact with the Google Calendar API in order to add events to my calendar. I am more or less following the directions here but the problem is that Chrome's Content Security Policies are blocking the script tags. To try to solve this, I downloaded https://apis.google.com/js/api.js and imported it with <script src="api.js"></script>. However, now I get the error:
"Refused to load the script 'https://apis.google.com//scs/apps-static//js/k=oz.gapi.en.-F_i8pxym_s.O/m=auth2,client/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCOcSmYYH6pFUBh5t_7PICWuDXqniQ/cb=gapi.loaded_0' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback."
It seems that the script I imported tries to download another script online. Should I download that one too? If not, how should I proceed? Also, given the nature of the Chrome Extension, will other parts of the example I linked above fail?
Thanks for your help!
Based on this "Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.", I think it's stating the solution here, you should set
script-src-elem
along with the
script-src