From acb2be1d3e93c3aeb64516d8663090476b69990f Mon Sep 17 00:00:00 2001 From: Franke Telgenhof Date: Wed, 16 Oct 2024 13:27:38 +0200 Subject: [PATCH] Fix: resolve error Cannot set properties of undefined when using signQuery=true --- src/interceptor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interceptor.ts b/src/interceptor.ts index 64b69f90..4ac05ade 100644 --- a/src/interceptor.ts +++ b/src/interceptor.ts @@ -179,8 +179,9 @@ export const aws4Interceptor = ({ const originalUrl = new URL(url); const signedUrl = new URL(originalUrl.origin + signingOptions.path); - for (const [key, value] of signedUrl.searchParams.entries()) { - config.params[key] = value; + config.params = { + ...config.params, + ...Object.fromEntries(signedUrl.searchParams.entries()) } }