Skip to content

Commit 5207d37

Browse files
committed
fixup!: move authority check up
1 parent f134aaa commit 5207d37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patches/proxy-uri.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.ts
136136
+ let resolvedUri = uri
137137
+ const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri)
138138
+
139-
+ if (localhostMatch) {
140-
+ if ((resolvedUri.authority !== location.host) && config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
139+
+ if (localhostMatch && resolvedUri.authority !== location.host) {
140+
+ if (config.productConfiguration && config.productConfiguration.proxyEndpointTemplate) {
141141
+ resolvedUri = URI.parse(new URL(config.productConfiguration.proxyEndpointTemplate.replace('{{port}}', localhostMatch.port.toString()), window.location.href).toString())
142142
+ } else {
143143
+ throw new Error(`Failed to resolve external URI: ${uri.toString()}. Could not determine base url because productConfiguration missing.`)

0 commit comments

Comments
 (0)