Https:// is not defined in .ic-assets.json5 initially

Hi, ICP developer community,

I’ve been stuck for a few hours on this frontend error.

start.6bc19524.js:1 Refused to connect to '' because it violates the following Content Security Policy directive: "connect-src 'self' http://localhost:* https://*".

Even after adding CSP to the meta tag, the error persisted. This issue was caused by the .ic-assets.json5 configuration.

Since is utilized for II canister and other calls, others might encounter the same issue.

By adding to the connect-src directive in it like so:

connect-src 'self' http://localhost:* https://*

this error can be resolved.


1 Like