File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
110110
111111 interface ICredential {
112112 service: string;
113- @@ -507,6 +508,23 @@ function doCreateUri(path: string, query
113+ @@ -507,6 +508,21 @@ function doCreateUri(path: string, query
114114 } : undefined,
115115 workspaceProvider: WorkspaceProvider.create(config),
116116 urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
@@ -121,12 +121,10 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
121121+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(uri)
122122+
123123+ if (localhostMatch) {
124- + let baseUrl = `${window.location.protocol}//${window.location.host}`
125124+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
126125+ resolvedUri = URI.parse(new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString())
127126+ } else {
128- + // Manually use code-server's built in /proxy/<port>
129- + resolvedUri = URI.parse(`${baseUrl}/proxy/${localhostMatch.port}`)
127+ + throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)
130128+ }
131129+ }
132130+
You can’t perform that action at this time.
0 commit comments