From c81e79c8c0e5ca923193f114846b274073365b39 Mon Sep 17 00:00:00 2001 From: emrah Date: Wed, 3 Jan 2024 15:05:02 +0300 Subject: fix(main): filter out frame-ancestors if exists in Content-Security-Policy --- main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.js b/main.js index 194ea5a..4afb853 100644 --- a/main.js +++ b/main.js @@ -272,6 +272,15 @@ function createJitsiMeetWindow() { details.responseHeaders['content-security-policy'] = [ cspFiltered ]; } + if (details.responseHeaders['Content-Security-Policy']) { + const cspFiltered = details.responseHeaders['Content-Security-Policy'][0] + .split(';') + .filter(x => x.indexOf('frame-ancestors') === -1) + .join(';'); + + details.responseHeaders['Content-Security-Policy'] = [ cspFiltered ]; + } + callback({ responseHeaders: details.responseHeaders }); -- cgit v1.2.3