diff --git a/src/main/context-handler.ts b/src/main/context-handler.ts index 32e933d8d4..a3cf6185dd 100644 --- a/src/main/context-handler.ts +++ b/src/main/context-handler.ts @@ -70,7 +70,8 @@ export class ContextHandler { async resolveAuthProxyUrl() { const proxyPort = await this.ensurePort(); - return `http://127.0.0.1:${proxyPort}`; + const path = this.clusterUrl.path !== "/" ? this.clusterUrl.path : "" + return `http://127.0.0.1:${proxyPort}${path}`; } async getApiTarget(isWatchRequest = false): Promise { @@ -88,7 +89,7 @@ export class ContextHandler { protected async newApiTarget(timeout: number): Promise { const proxyUrl = await this.resolveAuthProxyUrl(); return { - target: proxyUrl + this.clusterUrl.path, + target: proxyUrl, changeOrigin: true, timeout: timeout, headers: {