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 = {
8
8
} ,
9
9
port : process . env . PORT || 3000 ,
10
10
templateEngine : 'swig' ,
11
+
12
+ // The secret should be set to a non-guessable string that
13
+ // is used to compute a session hash
11
14
sessionSecret : 'MEAN' ,
15
+
16
+ // The name of the MongoDB collection to store sessions in
12
17
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
+
13
36
assets : {
14
37
lib : {
15
38
css : [
Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ module.exports = function(db) {
93
93
store : new mongoStore ( {
94
94
db : db . connection . db ,
95
95
collection : config . sessionCollection
96
- } )
96
+ } ) ,
97
+ cookie : config . sessionCookie ,
98
+ name : config . sessionName
97
99
} ) ) ;
98
100
99
101
// use passport session
You can’t perform that action at this time.
0 commit comments