From 37183e03599ed2294e63ab5efa3bb1e232a1cb02 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Wed, 27 Jul 2016 11:39:13 +0545 Subject: [PATCH] * 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 --- config/env/default.js | 3 +-- config/lib/express.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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