From 95693fb58ed64bd154a8743914309629dd9532da Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 24 Oct 2019 14:30:35 -0500 Subject: [PATCH] Handle /webview/vscode-resource/file urls See #1103. --- src/node/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/server.ts b/src/node/server.ts index 0e96556d..ab7ca0d5 100644 --- a/src/node/server.ts +++ b/src/node/server.ts @@ -523,8 +523,8 @@ export class MainServer extends Server { } break; case "/webview": - if (requestPath.indexOf("/vscode-resource") === 0) { - return this.getResource(requestPath.replace(/^\/vscode-resource/, "")); + if (/^\/vscode-resource/.test(requestPath)) { + return this.getResource(requestPath.replace(/^\/vscode-resource(\/file)?/, "")); } return this.getResource( this.rootPath,