diff --git a/config/env/default.js b/config/env/default.js index 75a908d1..74075012 100644 --- a/config/env/default.js +++ b/config/env/default.js @@ -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 diff --git a/config/lib/express.js b/config/lib/express.js index c3d4a88a..b6208967 100644 --- a/config/lib/express.js +++ b/config/lib/express.js @@ -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