From 796db55744ef29d7f425e4e633e79236ba7ad712 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 3 Nov 2020 13:54:55 +0100 Subject: [PATCH] Remove iframe around web worker in codespace case --- resources/web/code-web.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/web/code-web.js b/resources/web/code-web.js index 8658b737cb8..9be3bc2d811 100644 --- a/resources/web/code-web.js +++ b/resources/web/code-web.js @@ -386,6 +386,10 @@ async function handleRoot(req, res) { if (args['wrap-iframe']) { webConfigJSON._wrapWebWorkerExtHostInIframe = true; } + if (req.headers['x-forwarded-host']) { + // support for running in codespace => no iframe wrapping + delete webConfigJSON.webWorkerExtensionHostIframeSrc; + } const authSessionInfo = args['github-auth'] ? { id: uuid.v4(),