Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lambda-edge/refresh-auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export const handler: CloudFrontRequestHandler = async (event) => {
cookies.refreshToken
);

const headers: { "Content-Type": string; Authorization?: string } = {
const headers: { "Content-Type": string; Authorization?: string; "User-Agent":string } = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just change this type to OutgoingHttpHeaders -- bit annoying to spell all keys we use out like this.

"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "authorization-at-edge"
};

if (CONFIG.clientSecret) {
Expand Down
1 change: 1 addition & 0 deletions src/lambda-edge/shared/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export {
JwtExpiredError,
} from "aws-jwt-verify/error";


export interface CookieSettings {
idToken: string;
accessToken: string;
Expand Down