chenshenhai / koa2-note

《Koa2进阶学习笔记》已完结🎄🎄🎄
https://chenshenhai.github.io/koa2-note
MIT License
5.18k stars 1.29k forks source link

Session 管理会话的时候如何设置cookie有效时长 #44

Closed actuy closed 6 years ago

actuy commented 6 years ago

Add the middleware like this, use maxAge to set the time, but don't work. The cookie didn't be invalid. Why?

app.use(session({
  maxAge:5000
}))