Hi, I’m struggling to find a way to make a websocket connection from the add-on content script. I get the following error in the console, so I’m assuming it has something to do with the CSP configuration.
Content Security Policy: The page’s settings blocked the loading of a resource at wss://localhost:8000/sessions/ (“connect-src”).
I’ve read up the default CSP doc and the manifest setting, but I have a few questions about this
-
Can I specify connect-src in the CSP for the extension?
-
Can I specify wss:// as a protocol in the connect-src? The manifest reference suggests allowed protocols are blob:, filesystem:, moz-extension:, and https:
-
Does the content script follow the CSP defined in the add-on manifest?
I’m looking to understand how to get a websocket connection working on a content script, and any help there would be appreciated. Thank you!