requested changes

This commit is contained in:
Daniel Hougaard
2025-06-12 18:03:30 +04:00
parent 69392a4a51
commit 09d4cdc634
2 changed files with 5 additions and 3 deletions
@@ -94,7 +94,9 @@ 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 || headers.authorization) : null;
const authHeader = headers.Authorization || headers.authorization;
const region = authHeader ? awsRegionFromHeader(authHeader) : null;
if (!isValidAwsRegion(region)) {
throw new BadRequestError({ message: "Invalid AWS region" });