From 17aaa8b347e0bbc2f1e2bfb3dfcc40b7779e1461 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 11 Aug 2022 13:26:47 -0500 Subject: [PATCH] fix: logout appearing with auth=none (#5449) --- patches/logout.diff | 2 +- patches/proxy-uri.diff | 2 +- patches/service-worker.diff | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/logout.diff b/patches/logout.diff index 24c4923df..7b3fa1cbd 100644 --- a/patches/logout.diff +++ b/patches/logout.diff @@ -44,7 +44,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts codeServerVersion: this._productService.codeServerVersion, rootEndpoint: base, updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, -+ logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined, ++ logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, }, diff --git a/patches/proxy-uri.diff b/patches/proxy-uri.diff index c0899b0b7..d606515df 100644 --- a/patches/proxy-uri.diff +++ b/patches/proxy-uri.diff @@ -71,7 +71,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts @@ -310,6 +310,7 @@ export class WebClientServer { rootEndpoint: base, updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, - logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined, + logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, + proxyEndpointTemplate: base + '/proxy/{{port}}', embedderIdentifier: 'server-distro', extensionsGallery: this._productService.extensionsGallery, diff --git a/patches/service-worker.diff b/patches/service-worker.diff index 6ead1a60e..523c60da0 100644 --- a/patches/service-worker.diff +++ b/patches/service-worker.diff @@ -23,7 +23,7 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts +++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts @@ -315,6 +315,10 @@ export class WebClientServer { updateEndpoint: !this._environmentService.args['disable-update-check'] ? base + '/update/check' : undefined, - logoutEndpoint: this._environmentService.args['auth'] ? base + '/logout' : undefined, + logoutEndpoint: this._environmentService.args['auth'] && this._environmentService.args['auth'] !== "none" ? base + '/logout' : undefined, proxyEndpointTemplate: base + '/proxy/{{port}}', + serviceWorker: { + scope: vscodeBase + '/',