From 73ed34a2fad45dd7570360c8a00e0663c3939c53 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 7 May 2021 16:45:55 +0200 Subject: [PATCH] Fix: starting with Peertube 3.2.0, there is a header X-Frame-Options. Removing it on the iframe route. --- CHANGELOG.md | 6 ++++++ server/lib/routers/webchat.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ba5e21..3670ccf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## ??? + +### Fixes + +* Fix: starting with Peertube 3.2.0, there is a header 'X-Frame-Options'. Removing it on the iframe route. + ## v2.1.3 * Fix: 2.1.0 was in fact correct... Did not work on my preprod env because of... a Livebox bug... diff --git a/server/lib/routers/webchat.ts b/server/lib/routers/webchat.ts index 40d5dd80..f607219a 100644 --- a/server/lib/routers/webchat.ts +++ b/server/lib/routers/webchat.ts @@ -24,6 +24,8 @@ async function initWebchatRouter (options: RegisterServerOptions): Promise => { + res.removeHeader('X-Frame-Options') // this route can be opened in an iframe + const settings = await settingsManager.getSettings([ 'chat-use-prosody', 'chat-use-builtin', 'chat-room', 'chat-server', 'chat-bosh-uri', 'chat-ws-uri'