Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 37183e0

Browse files
authored
* 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
1 parent 89075cb commit 37183e0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

config/env/default.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ module.exports = {
2424
},
2525
// sessionSecret should be changed for security measures and concerns
2626
sessionSecret: process.env.SESSION_SECRET || 'MEAN',
27-
// sessionKey is set to the generic sessionId key used by PHP applications
28-
// for obsecurity reasons
27+
// sessionKey is the cookie session name
2928
sessionKey: 'sessionId',
3029
sessionCollection: 'sessions',
3130
// Lusca config

config/lib/express.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports.initSession = function (app, db) {
120120
httpOnly: config.sessionCookie.httpOnly,
121121
secure: config.sessionCookie.secure && config.secure.ssl
122122
},
123-
key: config.sessionKey,
123+
name: config.sessionKey,
124124
store: new MongoStore({
125125
mongooseConnection: db.connection,
126126
collection: config.sessionCollection

0 commit comments

Comments
 (0)