From ede3632a5602cb61305b01878b2b224fdcfcfe32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Fri, 19 Mar 2021 15:23:15 +0100 Subject: [PATCH] pimp up workbench-web.html --- resources/web/code-web.js | 6 +++-- .../code/browser/workbench/workbench-web.html | 23 ++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/resources/web/code-web.js b/resources/web/code-web.js index f4e97df0c60..2690d2fc9a7 100644 --- a/resources/web/code-web.js +++ b/resources/web/code-web.js @@ -226,12 +226,14 @@ const requestHandler = (req, res) => { const parsedUrl = url.parse(req.url, true); const pathname = parsedUrl.pathname; + res.setHeader('Access-Control-Allow-Origin', '*'); + try { - if (pathname === '/favicon.ico') { + if (/(\/static)?\/favicon\.ico/.test(pathname)) { // favicon return serveFile(req, res, path.join(APP_ROOT, 'resources', 'win32', 'code.ico')); } - if (pathname === '/manifest.json') { + if (/(\/static)?\/manifest\.json/.test(pathname)) { // manifest res.writeHead(200, { 'Content-Type': 'application/json' }); return res.end(JSON.stringify({ diff --git a/src/vs/code/browser/workbench/workbench-web.html b/src/vs/code/browser/workbench/workbench-web.html index 628d9778c54..df8ec8751ed 100644 --- a/src/vs/code/browser/workbench/workbench-web.html +++ b/src/vs/code/browser/workbench/workbench-web.html @@ -57,7 +57,24 @@ - - - + +