Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(desktop): allow ws: in CSP for http:// self-hosted instances

Hampus61537e71a765
diff --git a/fluxer_desktop/src/main/LocalAppCSP.ts b/fluxer_desktop/src/main/LocalAppCSP.ts
index 355f44c5d..7cd4ebf19 100644
--- a/fluxer_desktop/src/main/LocalAppCSP.ts
+++ b/fluxer_desktop/src/main/LocalAppCSP.ts
@@ -103,6 +103,10 @@ export function buildLocalAppCSP({nonce, cleartextInstanceOrigins = []}: LocalAp
extendFrom(connect, CONNECT_SOURCES);
extendFrom(connect, DESKTOP_CEILING_CONNECT_SOURCES);
extendFrom(connect, cleartextSources);
+ extendFrom(
+ connect,
+ cleartextSources.map((source) => `ws:${source.slice('http:'.length)}`),
+ );
directives.push(`connect-src ${connect.join(' ')}`);
const frame = [SELF_SOURCE];