From 6a218c37d278790650af6bfcb29dfd526f8df49b 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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/context-handler/context-handler.ts b/src/main/context-handler/context-handler.ts index 46e100c07e..fad22b5bde 100644 --- a/src/main/context-handler/context-handler.ts +++ b/src/main/context-handler/context-handler.ts @@ -141,17 +141,13 @@ export class ContextHandler { protected async newApiTarget(timeout: number): Promise { await this.ensureServer(); - const ca = this.dependencies.authProxyCa; - const clusterPath = this.clusterUrl.path !== "/" ? this.clusterUrl.path : ""; - const apiPrefix = `${this.kubeAuthProxy.apiPrefix}${clusterPath}`; - return { target: { protocol: "https:", host: "127.0.0.1", port: this.kubeAuthProxy.port, - path: apiPrefix, - ca, + path: this.kubeAuthProxy.apiPrefix, + ca: this.dependencies.authProxyCa, }, changeOrigin: true, timeout,