Skip to content

Commit

Permalink
fix(signature-v3): make x-amz-user-agent signable
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Mar 11, 2020
1 parent 87a7137 commit 917c119
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/signature-v4/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const ALWAYS_UNSIGNABLE_HEADERS = {
"transfer-encoding": true,
upgrade: true,
"user-agent": true,
"x-amz-user-agent": true,
"x-amzn-trace-id": true
};

Expand Down
2 changes: 2 additions & 0 deletions packages/signature-v4/src/getCanonicalHeaders.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe("getCanonicalHeaders", () => {
protocol: "https:",
path: "/",
headers: {
"x-amz-user-agent": "aws-sdk-js-v3",
host: "foo.us-east-1.amazonaws.com",
foo: "bar"
},
Expand All @@ -41,6 +42,7 @@ describe("getCanonicalHeaders", () => {
}

expect(getCanonicalHeaders(request)).toEqual({
"x-amz-user-agent": "aws-sdk-js-v3",
host: "foo.us-east-1.amazonaws.com",
foo: "bar"
});
Expand Down

0 comments on commit 917c119

Please sign in to comment.