aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authoremrah <emrah.eryilmaz@nordeck.net>2024-01-03 15:05:02 +0300
committerSaúl Ibarra Corretgé <s@saghul.net>2024-01-03 15:37:29 +0100
commitc81e79c8c0e5ca923193f114846b274073365b39 (patch)
tree6f1d40412d4fb0601de53bf45f6f0a3dc4295326 /main.js
parent63d3bca07eeef324e1322163fe7b645b8ec5aaf7 (diff)
fix(main): filter out frame-ancestors if exists in Content-Security-Policy
Diffstat (limited to 'main.js')
-rw-r--r--main.js9
1 files changed, 9 insertions, 0 deletions
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
});