mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix(identity/aws-auth): allow for lowercase authoriazation header
This commit is contained in:
@@ -94,7 +94,7 @@ export const identityAwsAuthServiceFactory = ({
|
||||
|
||||
const headers: TAwsGetCallerIdentityHeaders = JSON.parse(Buffer.from(iamRequestHeaders, "base64").toString());
|
||||
const body: string = Buffer.from(iamRequestBody, "base64").toString();
|
||||
const region = headers.Authorization ? awsRegionFromHeader(headers.Authorization) : null;
|
||||
const region = headers.authorization ? awsRegionFromHeader(headers.Authorization || headers.authorization) : null;
|
||||
|
||||
if (!isValidAwsRegion(region)) {
|
||||
throw new BadRequestError({ message: "Invalid AWS region" });
|
||||
|
||||
@@ -40,7 +40,8 @@ export type TAwsGetCallerIdentityHeaders = {
|
||||
"X-Amz-Date": string;
|
||||
"Content-Length": number;
|
||||
"x-amz-security-token": string;
|
||||
Authorization: string;
|
||||
Authorization?: string;
|
||||
authorization?: string;
|
||||
};
|
||||
|
||||
export type TGetCallerIdentityResponse = {
|
||||
|
||||
Reference in New Issue
Block a user