From eb7c533261a2ed0ae8161b23294ec1c3ad58e19c Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Fri, 6 Jun 2025 00:26:01 +0400 Subject: [PATCH] Update identity-kubernetes-auth-service.ts --- .../identity-kubernetes-auth-service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts index 3501c8d28..df72b428e 100644 --- a/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts +++ b/backend/src/services/identity-kubernetes-auth/identity-kubernetes-auth-service.ts @@ -107,7 +107,7 @@ export const identityKubernetesAuthServiceFactory = ({ // we always pass this, because its needed for both tcp and http protocol httpsAgent: new https.Agent({ ca: inputs.caCert, - rejectUnauthorized: !!inputs.caCert + rejectUnauthorized: Boolean(inputs.caCert) }) } ); @@ -158,6 +158,7 @@ export const identityKubernetesAuthServiceFactory = ({ if (servername.startsWith("https://") || servername.startsWith("http://")) { servername = new RE2("^https?:\\/\\/").replace(servername, ""); } + // get the last colon index, if it has a port, remove it, including the colon const lastColonIndex = servername.lastIndexOf(":"); if (lastColonIndex !== -1) {