Skip to content

Commit ebe8451

Browse files
committed
Fix web extensions breaking when the commit changes
1 parent abf4dce commit ebe8451

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

patches/marketplace.diff

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Add Open VSX default and an env var for marketplace, fix old marketplace
33
Our old marketplace only supports `serviceUrl` but this causes the marketplace
44
to be disabled entirely so this moves the template var check to fix that.
55

6+
This also removes serverRootPath from the web extension route because that will
7+
include the commit. When you update code-server the web extension will continue
8+
using this path since it is stored in the browser but the path will 404 because
9+
the commit no longer matches.
10+
611
This can be tested by setting EXTENSIONS_GALLERY set to:
712

813
'{"serviceUrl": "https://extensions.coder.com/api"}'
@@ -32,6 +37,15 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
3237
===================================================================
3338
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
3439
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
40+
@@ -111,7 +111,7 @@ export class WebClientServer {
41+
const serverRootPath = getRemoteServerRootPath(_productService);
42+
this._staticRoute = `${serverRootPath}/static`;
43+
this._callbackRoute = `${serverRootPath}/callback`;
44+
- this._webExtensionRoute = `${serverRootPath}/web-extension-resource`;
45+
+ this._webExtensionRoute = `/web-extension-resource`;
46+
}
47+
48+
/**
3549
@@ -308,14 +308,14 @@ export class WebClientServer {
3650
codeServerVersion: this._productService.codeServerVersion,
3751
rootEndpoint: base,

0 commit comments

Comments
 (0)