mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 22:27:48 +00:00
Update identity-kubernetes-auth-service.ts
This commit is contained in:
@@ -107,7 +107,7 @@ export const identityKubernetesAuthServiceFactory = ({
|
|||||||
// we always pass this, because its needed for both tcp and http protocol
|
// we always pass this, because its needed for both tcp and http protocol
|
||||||
httpsAgent: new https.Agent({
|
httpsAgent: new https.Agent({
|
||||||
ca: inputs.caCert,
|
ca: inputs.caCert,
|
||||||
rejectUnauthorized: !!inputs.caCert
|
rejectUnauthorized: Boolean(inputs.caCert)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -158,6 +158,7 @@ export const identityKubernetesAuthServiceFactory = ({
|
|||||||
if (servername.startsWith("https://") || servername.startsWith("http://")) {
|
if (servername.startsWith("https://") || servername.startsWith("http://")) {
|
||||||
servername = new RE2("^https?:\\/\\/").replace(servername, "");
|
servername = new RE2("^https?:\\/\\/").replace(servername, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the last colon index, if it has a port, remove it, including the colon
|
// get the last colon index, if it has a port, remove it, including the colon
|
||||||
const lastColonIndex = servername.lastIndexOf(":");
|
const lastColonIndex = servername.lastIndexOf(":");
|
||||||
if (lastColonIndex !== -1) {
|
if (lastColonIndex !== -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user