This repository was archived by the owner on Aug 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,31 @@ module.exports = {
88 } ,
99 port : process . env . PORT || 3000 ,
1010 templateEngine : 'swig' ,
11+
12+ // The secret should be set to a non-guessable string that
13+ // is used to compute a session hash
1114 sessionSecret : 'MEAN' ,
15+
16+ // The name of the MongoDB collection to store sessions in
1217 sessionCollection : 'sessions' ,
18+
19+ // The session cookie settings
20+ sessionCookie : {
21+ path : '/' ,
22+ httpOnly : true ,
23+ // If secure is set to true then it will cause the cookie to be set
24+ // only when SSL-enabled (HTTPS) is used, and otherwise it won't
25+ // set a cookie. 'true' is recommended yet it requires the above
26+ // mentioned pre-requisite.
27+ secure : false ,
28+ // Only set the maxAge to null if the cookie shouldn't be expired
29+ // at all. The cookie will expunge when the browser is closed.
30+ maxAge : null
31+ } ,
32+
33+ // The session cookie name
34+ sessionName : 'connect.sid' ,
35+
1336 assets : {
1437 lib : {
1538 css : [
Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ module.exports = function(db) {
9393 store : new mongoStore ( {
9494 db : db . connection . db ,
9595 collection : config . sessionCollection
96- } )
96+ } ) ,
97+ cookie : config . sessionCookie ,
98+ name : config . sessionName
9799 } ) ) ;
98100
99101 // use passport session
You can’t perform that action at this time.
0 commit comments