-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
4 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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module.exports = { | ||
isProdEnv: !/dev/.test(process.env.NODE_ENV || ''), | ||
isProdEnv: !/dev/i.test(process.env.NODE_ENV || ''), | ||
koaSessionConfig: { | ||
maxAge: 864e5 * 7, // seven days | ||
httpOnly: true /** (boolean) httpOnly or not (default true) */, | ||
signed: true /** (boolean) signed or not (default true) */, | ||
rolling: true /** (boolean) Force a session identifier cookie to be set on every response. The expiration is reset to the original maxAge, resetting the expiration countdown. (default is false) */, | ||
renew: true /** (boolean) renew session when session is nearly expired, so we can always keep user logged in. (default is false)*/, | ||
secure: this.isProdEnv ? true : false /** (boolean) secure cookie*/, | ||
secure: false /** (boolean) secure cookie*/, | ||
}, | ||
}; |
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