* fix(express): updating express session name variable due to deprecation

* fix(express): updating express session name variable from key (the old deprecated one) to the new variable: name

* fix(express): re-wording confusing comment on the session cookie name
This commit is contained in:
Liran Tal
2016-07-27 11:39:13 +05:45
committed by GitHub
parent 89075cb8d3
commit 37183e0359
2 changed files with 2 additions and 3 deletions

View File

@@ -24,8 +24,7 @@ module.exports = {
},
// sessionSecret should be changed for security measures and concerns
sessionSecret: process.env.SESSION_SECRET || 'MEAN',
// sessionKey is set to the generic sessionId key used by PHP applications
// for obsecurity reasons
// sessionKey is the cookie session name
sessionKey: 'sessionId',
sessionCollection: 'sessions',
// Lusca config

View File

@@ -120,7 +120,7 @@ module.exports.initSession = function (app, db) {
httpOnly: config.sessionCookie.httpOnly,
secure: config.sessionCookie.secure && config.secure.ssl
},
key: config.sessionKey,
name: config.sessionKey,
store: new MongoStore({
mongooseConnection: db.connection,
collection: config.sessionCollection