Skip to content

Commit 71354c2

Browse files
sagar-routSagar Rout
authored andcommitted
Set default user-agent to "authorization-at-edge"
1 parent 2d1143c commit 71354c2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/lambda-edge/refresh-auth/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ export const handler: CloudFrontRequestHandler = async (event) => {
3636
cookies.refreshToken
3737
);
3838

39-
const headers: { "Content-Type": string; Authorization?: string } = {
39+
const headers: { "Content-Type": string; Authorization?: string; "User-Agent":string } = {
4040
"Content-Type": "application/x-www-form-urlencoded",
41+
"User-Agent": "authorization-at-edge"
4142
};
4243

4344
if (CONFIG.clientSecret) {

src/lambda-edge/shared/shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
JwtExpiredError,
1717
} from "aws-jwt-verify/error";
1818

19+
1920
export interface CookieSettings {
2021
idToken: string;
2122
accessToken: string;

0 commit comments

Comments
 (0)