Now always create session to ensure cookie authorize can proceed

This commit is contained in:
Wu Cheng-Han 2015-12-30 00:34:32 -05:00
parent f5010af4f1
commit db324c5624
1 changed files with 1 additions and 1 deletions

2
app.js
View File

@ -96,7 +96,7 @@ app.use(session({
name: config.sessionname, name: config.sessionname,
secret: config.sessionsecret, secret: config.sessionsecret,
resave: false, //don't save session if unmodified resave: false, //don't save session if unmodified
saveUninitialized: false, //don't create session until something stored saveUninitialized: true, //always create session to ensure the origin
cookie: { cookie: {
maxAge: new Date(Date.now() + config.sessionlife), maxAge: new Date(Date.now() + config.sessionlife),
expires: new Date(Date.now() + config.sessionlife), expires: new Date(Date.now() + config.sessionlife),