File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-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,22 @@ function doCreateUri(path: string, query
113+ @@ -507,6 +508,23 @@ function doCreateUri(path: string, query
114114 } : undefined,
115115 workspaceProvider: WorkspaceProvider.create(config),
116116 urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
@@ -123,10 +123,11 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
123123+ if (localhostMatch) {
124124+ let baseUrl = `${window.location.protocol}//${window.location.host}`
125125+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
126- + baseUrl = new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString()
126+ + resolvedUri = URI.parse(new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString())
127+ + } else {
128+ + // Manually use code-server's built in /proxy/<port>
129+ + resolvedUri = URI.parse(`${baseUrl}/proxy/${localhostMatch.port}`)
127130+ }
128- + // Use code-server's built in /proxy/<port>
129- + resolvedUri = URI.parse(`${baseUrl}/proxy/${localhostMatch.port}`)
130131+ }
131132+
132133+ // If not localhost, return unmodified
You can’t perform that action at this time.
0 commit comments