File tree 1 file changed +5
-4
lines changed
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
110
110
111
111
interface ICredential {
112
112
service: string;
113
- @@ -507,6 +508,22 @@ function doCreateUri(path: string, query
113
+ @@ -507,6 +508,23 @@ function doCreateUri(path: string, query
114
114
} : undefined,
115
115
workspaceProvider: WorkspaceProvider.create(config),
116
116
urlCallbackProvider: new LocalStorageURLCallbackProvider(config.callbackRoute),
@@ -123,10 +123,11 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
123
123
+ if (localhostMatch) {
124
124
+ let baseUrl = `${window.location.protocol}//${window.location.host}`
125
125
+ 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}`)
127
130
+ }
128
- + // Use code-server's built in /proxy/<port>
129
- + resolvedUri = URI.parse(`${baseUrl}/proxy/${localhostMatch.port}`)
130
131
+ }
131
132
+
132
133
+ // If not localhost, return unmodified
You can’t perform that action at this time.
0 commit comments