requested changes

This commit is contained in:
Daniel Hougaard
2025-05-29 16:57:22 +04:00
parent f6b7717517
commit 78c4a591a9
2 changed files with 2 additions and 4 deletions

View File

@@ -104,7 +104,6 @@ export const registerIdentityKubernetesRouter = async (server: FastifyZodProvide
.object({
kubernetesHost: z
.string()
.url()
.trim()
.min(1)
.describe(KUBERNETES_AUTH.ATTACH.kubernetesHost)
@@ -224,7 +223,6 @@ export const registerIdentityKubernetesRouter = async (server: FastifyZodProvide
.object({
kubernetesHost: z
.string()
.url()
.trim()
.min(1)
.optional()

View File

@@ -189,10 +189,10 @@ export const identityKubernetesAuthServiceFactory = ({
let { kubernetesHost } = identityKubernetesAuth;
if (kubernetesHost.startsWith("https://") || kubernetesHost.startsWith("http://")) {
kubernetesHost = kubernetesHost.replace(new RE2("^https?:\\/\\/"), "");
kubernetesHost = new RE2("^https?:\\/\\/").replace(kubernetesHost, "");
}
const [k8sHost, k8sPort] = kubernetesHost.split(":") ?? [];
const [k8sHost, k8sPort] = kubernetesHost.split(":");
const data = identityKubernetesAuth.gatewayId
? await $gatewayProxyWrapper(