Diagnostic step 1
Add the explicit wss origin to the server CSP header, e.g. Content-Security-Policy: connect-src 'self' wss://ws.example.com wss:;
Generated Oct 27, 2026, 9:31:39 AM
Add the explicit wss origin to the server CSP header, e.g. Content-Security-Policy: connect-src 'self' wss://ws.example.com wss:;
Ensure the CSP header is served to worker scope (Service Worker fetches inherit header if same origin); if worker sits on another scope, set header for that scope too.
If Service Worker initiates the WS (via fetch or clients.openWindow), verify the worker's scope and that it runs under the same origin; instrument with console warnings in the worker.
Test by unregistering the service worker and confirming connect works; then re-register with updated CSP header and verify Firefox accepts the WSS upgrade.
If problem persists, capture network logs (about:networking) and browser console CSP reports and compare the exact effective-policy reported by Firefox to confirm mismatch.