Can external APIs be hit from code sandbox

I am trying to call an external API through javascript insde code sandbox, but call is blocked by csp, even when the url is added to csp connect-src list, is there a specific way to add this for code sandbox.

Below is the error I get, thanks in advance!

VM6316:4 Refused to connect to ‘https://xyz.com/a’ because it violates the following Content Security Policy directive: “default-src data: blob:”. Note that ‘connect-src’ was not explicitly set, so ‘default-src’ is used as a fallback.

No, Code Sandbox does not allow network requests as a security precaution. Any needed network requests must be proxied from the Code Sandbox to Queries via SlateFunctions.

See the warning below Javascript in Slate’s Code Sandbox documentation.

@jchomicki Very clear, Thanks for the quick reply!