Skip to content

Commit

Permalink
fix: enable Secure cookies with the default settings if on secure req
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed May 10, 2019
1 parent 4c7e877 commit a056bfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 2 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1678,9 +1678,7 @@ _**default value**_:
{
httpOnly: true,
maxAge: 1209600000,
overwrite: true,
secure: undefined,
signed: undefined
overwrite: true
}
```

Expand Down Expand Up @@ -1710,9 +1708,7 @@ _**default value**_:
{
httpOnly: true,
maxAge: 600000,
overwrite: true,
secure: undefined,
signed: undefined
overwrite: true
}
```

Expand Down
4 changes: 0 additions & 4 deletions lib/helpers/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ const DEFAULTS = {
* recommendation: set cookies.keys and cookies.long.signed = true
*/
long: {
secure: undefined,
signed: undefined,
httpOnly: true, // cookies are not readable by client-side javascript
maxAge: (14 * 24 * 60 * 60) * 1000, // 14 days in ms
overwrite: true,
Expand All @@ -201,8 +199,6 @@ const DEFAULTS = {
* recommendation: set cookies.keys and cookies.short.signed = true
*/
short: {
secure: undefined,
signed: undefined,
httpOnly: true, // cookies are not readable by client-side javascript
maxAge: (10 * 60) * 1000, // 10 minutes in ms
overwrite: true,
Expand Down

0 comments on commit a056bfd

Please sign in to comment.