diff --git a/docs/source/zh-cn/core/cookie-and-session.md b/docs/source/zh-cn/core/cookie-and-session.md index 84c5cd243d..abaaec7d1c 100644 --- a/docs/source/zh-cn/core/cookie-and-session.md +++ b/docs/source/zh-cn/core/cookie-and-session.md @@ -187,8 +187,8 @@ exports.login = function* (ctx) { // 设置 Session this.session.user = user; - // 如果用户勾选了 `记住我`,设置一分钟的过期时间 - if (rememberMe) this.session.maxAge = ms('1m'); + // 如果用户勾选了 `记住我`,设置 30 天的过期时间 + if (rememberMe) this.session.maxAge = ms('30d'); }; ``` @@ -215,4 +215,4 @@ exports.middleware = [ 'saveSession' ]; ``` [egg-redis]: https://github.com/eggjs/egg-redis -[egg-session-redis]: https://github.com/eggjs/egg-session-redis \ No newline at end of file +[egg-session-redis]: https://github.com/eggjs/egg-session-redis