Fix server session not set correctly
This commit is contained in:
parent
74793b516a
commit
85c760d720
1 changed files with 1 additions and 2 deletions
3
app.js
3
app.js
|
@ -101,10 +101,9 @@ app.use(session({
|
||||||
resave: false, //don't save session if unmodified
|
resave: false, //don't save session if unmodified
|
||||||
saveUninitialized: true, //always create session to ensure the origin
|
saveUninitialized: true, //always create session to ensure the origin
|
||||||
cookie: {
|
cookie: {
|
||||||
maxAge: new Date(Date.now() + config.sessionlife),
|
maxAge: config.sessionlife,
|
||||||
expires: new Date(Date.now() + config.sessionlife),
|
expires: new Date(Date.now() + config.sessionlife),
|
||||||
},
|
},
|
||||||
maxAge: new Date(Date.now() + config.sessionlife),
|
|
||||||
store: sessionStore
|
store: sessionStore
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue