diff --git a/lib/aws-sigv4.js b/lib/aws-sigv4.js index 54c2707..8972844 100644 --- a/lib/aws-sigv4.js +++ b/lib/aws-sigv4.js @@ -102,9 +102,7 @@ const impl = { // Copy the headers from the AWS HttpRequest back to the Artillery requestParams. // This will now include the necessary Authorization header needed for AWS. - for (header in request.headers) { - requestParams.headers[header] = request.headers[header] - } + requestParams.headers = Object.assign({}, requestParams.headers, request.headers); // Allow Artillery to continue. callback()