From 2a096a48c11f249c2194eaa4179c652957978c8c Mon Sep 17 00:00:00 2001 From: Hai Cao Date: Mon, 9 Aug 2021 15:53:37 -0700 Subject: [PATCH] Use local webview endpoint for web mode (#16570) --- src/vs/code/browser/workbench/workbench.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/code/browser/workbench/workbench.ts b/src/vs/code/browser/workbench/workbench.ts index 8b06a0a8f7..567183fda9 100644 --- a/src/vs/code/browser/workbench/workbench.ts +++ b/src/vs/code/browser/workbench/workbench.ts @@ -411,7 +411,10 @@ class WindowIndicator implements IWindowIndicator { throw new Error('Missing web configuration element'); } - const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = JSON.parse(configElementAttribute); + const config: IWorkbenchConstructionOptions & { folderUri?: UriComponents, workspaceUri?: UriComponents } = { + ...JSON.parse(configElementAttribute), + webviewEndpoint: `${window.location.origin}${window.location.pathname.replace(/\/+$/, '')}/webview` + }; // {{SQL CARBON EDIT}} Use local webview endpoint // Find workspace to open and payload let foundWorkspace = false;