-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cookieMaxAge and secureCookies options (#1612)
- Loading branch information
1 parent
c50a7be
commit 0a627ef
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"releases": [ | ||
{ "name": "@keystone-alpha/keystone", "type": "minor" }, | ||
{ "name": "@keystone-alpha/session", "type": "major" } | ||
], | ||
"dependents": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Adds a `cookieMaxAge` and `secureCookies` option to the keystone constructor. | ||
|
||
These will default to 30 days for `cookieMaxAge` and `true` in production `false` in other environments for `secureCookies`. | ||
|
||
### Usage | ||
```javascript | ||
const keystone = new Keystone({ | ||
cookieMaxAge: 1000 * 60 * 60 * 24 * 7, // 1 week | ||
secureCookies: true, | ||
}); | ||
``` | ||
|
||
Note: `commonSessionMiddleware` now accepts a config object rather than multiple arguments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters