File tree 1 file changed +2
-4
lines changed
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
110
110
111
111
interface ICredential {
112
112
service: string;
113
- @@ -507,6 +508,23 @@ function doCreateUri(path: string, query
113
+ @@ -507,6 +508,21 @@ function doCreateUri(path: string, query
114
114
} : undefined,
115
115
workspaceProvider: WorkspaceProvider.create(config),
116
116
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
@@ -121,12 +121,10 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
121
121
+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(uri)
122
122
+
123
123
+ if (localhostMatch) {
124
- + let baseUrl = `${window.location.protocol}//${window.location.host}`
125
124
+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
126
125
+ resolvedUri = URI.parse(new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString())
127
126
+ } 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.`)
130
128
+ }
131
129
+ }
132
130
+
You can’t perform that action at this time.
0 commit comments