From e1152790c318b054f3f9276ba5d8904d6d32db9b Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 7 Jun 2022 16:13:06 -0400 Subject: [PATCH] Fix cluster server path being duplicated by proxy (#5550) --- src/main/context-handler/context-handler.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/context-handler/context-handler.ts b/src/main/context-handler/context-handler.ts index cf35a0a67c..3ab4fc3ca7 100644 --- a/src/main/context-handler/context-handler.ts +++ b/src/main/context-handler/context-handler.ts @@ -152,9 +152,6 @@ export class ContextHandler implements ClusterContextHandler { protected async newApiTarget(timeout: number): Promise { const kubeAuthProxy = await this.ensureServerHelper(); - const ca = this.resolveAuthProxyCa(); - const clusterPath = this.clusterUrl.path !== "/" ? this.clusterUrl.path : ""; - const apiPrefix = `${kubeAuthProxy.apiPrefix}${clusterPath}`; const headers: Record = {}; if (this.clusterUrl.hostname) { @@ -166,8 +163,8 @@ export class ContextHandler implements ClusterContextHandler { protocol: "https:", host: "127.0.0.1", port: kubeAuthProxy.port, - path: apiPrefix, - ca, + path: kubeAuthProxy.apiPrefix, + ca: this.resolveAuthProxyCa(), }, changeOrigin: true, timeout,