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

Commit

Permalink
Merge pull request #798 from lirantal/feature/security-enhancements-s…
Browse files Browse the repository at this point in the history
…ession

Express sessionKey configuration option
  • Loading branch information
lirantal committed Aug 14, 2015
2 parents d41490c + 360c3a4 commit 7200426
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/env/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ module.exports = {
},
port: process.env.PORT || 3000,
templateEngine: 'swig',
// Session details
// sessionSecret should be changed for security measures and concerns
sessionSecret: 'MEAN',
// sessionKey is set to the generic sessionId key used by PHP applications
// for obsecurity reasons
sessionKey: 'sessionId',
sessionCollection: 'sessions',
logo: 'modules/core/img/brand/logo.png',
favicon: 'modules/core/img/brand/favicon.ico'
Expand Down
1 change: 1 addition & 0 deletions config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ module.exports.initSession = function (app, db) {
saveUninitialized: true,
resave: true,
secret: config.sessionSecret,
key: config.sessionKey,
store: new MongoStore({
mongooseConnection: db.connection,
collection: config.sessionCollection
Expand Down

0 comments on commit 7200426

Please sign in to comment.