Skip to content

Commit

Permalink
Lowercase and trim signed headers
Browse files Browse the repository at this point in the history
  • Loading branch information
joehoyle committed Sep 21, 2023
1 parent eb59e4c commit ed4d6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function getS3File( config: Config, key: string, args: Args ): Prom
'X-Amz-Security-Token',
] as const;
const presignedParams: { [K in ( typeof presignedParamNames )[number]]?: string } = {}; // eslint-disable-line no-unused-vars
const signedHeaders = args['X-Amz-SignedHeaders']?.split( ';' ) || [];
const signedHeaders = ( args['X-Amz-SignedHeaders']?.split( ';' ) || [] ).map( header => header.toLowerCase().trim() );

for ( const paramName of presignedParamNames ) {
if ( args[paramName] ) {
Expand Down

0 comments on commit ed4d6ef

Please sign in to comment.