Skip to content

Commit

Permalink
Refactor cookieOptions object
Browse files Browse the repository at this point in the history
  • Loading branch information
Eprince-hub committed Nov 3, 2024
1 parent 3680e99 commit 5952f2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions util/cookies.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const secureCookieOptions = {
httpOnly: true,
path: '/',
maxAge: 60 * 60 * 24, // Cookie expires in 24 hours
secure: process.env.NODE_ENV === 'production',
maxAge: 60 * 60 * 24, // This is 24 hours
sameSite: 'lax', // For cross site scripting
httpOnly: true,
sameSite: 'lax', // Prevent sending cookie with images or frames of your content originating on other websites
} as const;

0 comments on commit 5952f2e

Please sign in to comment.