Skip to content

Commit 2785d2f

Browse files
authored
fix(signature-v4): make x-amz-user-agent signable (#997)
V2 doesn't mark the header as unsigned either: https://github.com/aws/aws-sdk-js/blob/999ebda726224a67f0fe207702bf5b03609775a4/lib/signers/v4.js#L191-L199
1 parent 5069e8a commit 2785d2f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/signature-v4/src/constants.ts

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const ALWAYS_UNSIGNABLE_HEADERS = {
3030
"transfer-encoding": true,
3131
upgrade: true,
3232
"user-agent": true,
33-
"x-amz-user-agent": true,
3433
"x-amzn-trace-id": true
3534
};
3635

packages/signature-v4/src/getCanonicalHeaders.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("getCanonicalHeaders", () => {
3131
protocol: "https:",
3232
path: "/",
3333
headers: {
34+
"x-amz-user-agent": "aws-sdk-js-v3",
3435
host: "foo.us-east-1.amazonaws.com",
3536
foo: "bar"
3637
},
@@ -41,6 +42,7 @@ describe("getCanonicalHeaders", () => {
4142
}
4243

4344
expect(getCanonicalHeaders(request)).toEqual({
45+
"x-amz-user-agent": "aws-sdk-js-v3",
4446
host: "foo.us-east-1.amazonaws.com",
4547
foo: "bar"
4648
});

0 commit comments

Comments
 (0)