Skip to content

Commit

Permalink
Set initial maxAge
Browse files Browse the repository at this point in the history
  • Loading branch information
zavr-1 committed Jun 29, 2019
1 parent a4dcdc4 commit 0bd88b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function formatOpts(opts) {
// back-compat maxage
if (!('maxAge' in opts)) opts.maxAge = opts.maxage;

opts.maxAge = opts.maxAge || 86400000;

// defaults
if (opts.overwrite == null) opts.overwrite = true;
if (opts.httpOnly == null) opts.httpOnly = true;
Expand Down

0 comments on commit 0bd88b7

Please sign in to comment.