Skip to content

Commit

Permalink
fix(main): filter out frame-ancestors if exists in Content-Security-P…
Browse files Browse the repository at this point in the history
…olicy
  • Loading branch information
emrahcom authored and saghul committed Jan 3, 2024
1 parent 63d3bca commit c81e79c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down

0 comments on commit c81e79c

Please sign in to comment.