Skip to content

Commit 74eedab

Browse files
authored
Fixing port forwarding (#74)
1 parent fa8cd95 commit 74eedab

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

patches/sagemaker.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ sagemaker/sagemaker-ui-post-startup.diff
3838
sagemaker/sagemaker-extension-smus-support.diff
3939
sagemaker/post-startup-notifications.diff
4040
sagemaker/sagemaker-extensions-sync.diff
41+
sagemaker/fix-port-forwarding.diff
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Index: third-party-src/src/vs/code/browser/workbench/workbench.ts
2+
===================================================================
3+
--- third-party-src.orig/src/vs/code/browser/workbench/workbench.ts
4+
+++ third-party-src/src/vs/code/browser/workbench/workbench.ts
5+
@@ -635,7 +635,7 @@ function readCookie(name: string): strin
6+
const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
7+
if (localhostMatch && resolvedUri.authority !== location.host) {
8+
if (config?.productConfiguration?.rootEndpoint) {
9+
- const proxyUri = `${config?.productConfiguration.rootEndpoint}/ports/${localhostMatch.port}/`;
10+
+ const proxyUri = `${config?.productConfiguration.rootEndpoint}/codeeditor/default/ports/${localhostMatch.port}/`;
11+
resolvedUri = URI.parse(new URL(proxyUri, window.location.href).toString())
12+
} else {
13+
throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)

0 commit comments

Comments
 (0)