Skip to content

Commit

Permalink
fix: Add secure flag to auth cookie (#2637)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jan 8, 2024
1 parent 25840a2 commit 150d564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.planx.uk/modules/auth/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ function setJWTCookie(returnTo: string, res: Response, req: Request) {
new Date().setFullYear(new Date().getFullYear() + 1),
).getTime(),
sameSite: "none",
secure: true,
};

const httpOnlyCookieOptions: CookieOptions = {
...defaultCookieOptions,
httpOnly: true,
secure: true,
};

// Set secure, httpOnly cookie with JWT
Expand Down

0 comments on commit 150d564

Please sign in to comment.