Fix server session not set correctly

This commit is contained in:
Cheng-Han, Wu 2016-04-20 18:14:48 +08:00
parent 74793b516a
commit 85c760d720
1 changed files with 1 additions and 2 deletions

3
app.js
View File

@ -101,10 +101,9 @@ app.use(session({
resave: false, //don't save session if unmodified
saveUninitialized: true, //always create session to ensure the origin
cookie: {
maxAge: new Date(Date.now() + config.sessionlife),
maxAge: config.sessionlife,
expires: new Date(Date.now() + config.sessionlife),
},
maxAge: new Date(Date.now() + config.sessionlife),
store: sessionStore
}));