Post

Replies

Boosts

Views

Activity

Safari Extension: Refused to connect to <site> because it does not appear in the connect-src directive of the Content Security Policy.
I'm trying to make a request using fetch to my api inside a safari extension background page. This is a manifest v3 extension converted from a chrome extension (which works). Inspecting the background page, I see an error message which reads Refused to connect to <site> because it does not appear in the connect-src directive of the Content Security Policy. I have tried setting a policy for default-src and connect-src in the extension_pages field of the content_security_policy key in the manifest.json file, but the error persists. How can I make a fetch request to an api in a background page?
4
2
1.8k
Nov ’22