From 6166a1c1154a622e0c13f17ddaec3f211872ccc3 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 24 Jan 2025 03:25:52 +0100 Subject: [PATCH] unbrick discord :sorrykirino: --- src/main/csp.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/csp.ts b/src/main/csp.ts index 964cc5da5..91ca3bec1 100644 --- a/src/main/csp.ts +++ b/src/main/csp.ts @@ -74,7 +74,7 @@ const patchCsp = (headers: Record) => { const csp = parsePolicy(headers[header][0]); const pushDirective = (directive: string, ...values: string[]) => { - csp[directive] ??= []; + csp[directive] ??= ["'self'"]; csp[directive].push(...values); }; @@ -90,6 +90,7 @@ const patchCsp = (headers: Record) => { } } + console.log(csp); headers[header] = [stringifyPolicy(csp)]; } };