Skip to content

Commit

Permalink
Change cookie age to 14 days
Browse files Browse the repository at this point in the history
  • Loading branch information
adic2023 committed Sep 27, 2023
1 parent 6c3ff31 commit 22783b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ const initExpress = (): void => {
cookie: {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
// don't persist to disk but keep until you quit and reopen the browser; MongoStore also
// expires sessions after two weeks of inactivity
maxAge: 14 * 24 * 3600, // 14 days
// MongoStore also expires sessions after two weeks of inactivity
},
name: 'sauce',
resave: false,
Expand Down

0 comments on commit 22783b7

Please sign in to comment.