Fix cluster server path being duplicated by proxy (#5550)

This commit is contained in:
Sebastian Malton committed 2022-06-09 14:39:27 -04:00
1 parent 1260fac281
commit 6a218c37d2
1 file changed
+2 -6
+2 -6
View File
@@ -141,17 +141,13 @@ export class ContextHandler {
protected async newApiTarget(timeout: number): Promise<httpProxy.ServerOptions> {
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,