mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #3620 from Infisical/daniel/k8s-auth-fix
fix(identities-auth): fixed kubernetes auth login
This commit is contained in:
@@ -79,7 +79,8 @@ export const identityKubernetesAuthServiceFactory = ({
|
||||
|
||||
const callbackResult = await withGatewayProxy(
|
||||
async (port) => {
|
||||
const res = await gatewayCallback("localhost", port);
|
||||
// Needs to be https protocol or the kubernetes API server will fail with "Client sent an HTTP request to an HTTPS server"
|
||||
const res = await gatewayCallback("https://localhost", port);
|
||||
return res;
|
||||
},
|
||||
{
|
||||
@@ -138,11 +139,7 @@ export const identityKubernetesAuthServiceFactory = ({
|
||||
}
|
||||
|
||||
const tokenReviewCallback = async (host: string = identityKubernetesAuth.kubernetesHost, port?: number) => {
|
||||
let baseUrl = `https://${host}`;
|
||||
|
||||
if (port) {
|
||||
baseUrl += `:${port}`;
|
||||
}
|
||||
const baseUrl = port ? `${host}:${port}` : host;
|
||||
|
||||
const res = await axios
|
||||
.post<TCreateTokenReviewResponse>(
|
||||
|
||||
Reference in New Issue
Block a user