Importing external JS file while adhering to CSP

I'm trying to build a simple chrome extension using the GoogleMaps API. The HTML works fine on its own, but when I try to use it as an extension, I get this
Refused to load the script 'https://maps.googleapis.com/maps/api/js?key=' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Refused to load the script 'https://maps.googleapis.com/maps/api/js?key=' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
I guess it's not loading the external scripts because it violates CSP for some reason? I've tried to look up solutions in places like https://stackoverflow.com/questions/17653384/refused-to-execute-inline-script-because-it-violates-the-following-content-secur but I honestly don't even understand what they mean. How can I make my reference adhere to CSP?
Stack Overflow
Refused to execute inline script because it violates the following ...
Im creating a chrome extension for Rss reader in that im getting the above error. please help manifest.json { "name": "Tutorialzine Extension", "manifest_version&qu...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server