mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix cluster server path being duplicated by proxy (#5550)
This commit is contained in:
parent
1b7dd717a5
commit
e1152790c3
@ -152,9 +152,6 @@ export class ContextHandler implements ClusterContextHandler {
|
|||||||
|
|
||||||
protected async newApiTarget(timeout: number): Promise<httpProxy.ServerOptions> {
|
protected async newApiTarget(timeout: number): Promise<httpProxy.ServerOptions> {
|
||||||
const kubeAuthProxy = await this.ensureServerHelper();
|
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<string, string> = {};
|
const headers: Record<string, string> = {};
|
||||||
|
|
||||||
if (this.clusterUrl.hostname) {
|
if (this.clusterUrl.hostname) {
|
||||||
@ -166,8 +163,8 @@ export class ContextHandler implements ClusterContextHandler {
|
|||||||
protocol: "https:",
|
protocol: "https:",
|
||||||
host: "127.0.0.1",
|
host: "127.0.0.1",
|
||||||
port: kubeAuthProxy.port,
|
port: kubeAuthProxy.port,
|
||||||
path: apiPrefix,
|
path: kubeAuthProxy.apiPrefix,
|
||||||
ca,
|
ca: this.resolveAuthProxyCa(),
|
||||||
},
|
},
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
timeout,
|
timeout,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user