Browse Source

Merge pull request #298 from hitochan777/feature/session-setting

Enable custom session name with SESSION_NAME env var
Yuki Takei 8 years ago
parent
commit
b392119531
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/crowi/index.js

+ 4 - 0
lib/crowi/index.js

@@ -172,6 +172,10 @@ Crowi.prototype.setupSessionConfig = function() {
       },
     };
 
+    if (self.env.SESSION_NAME) {
+        sessionConfig.name = self.env.SESSION_NAME;
+    }
+
     if (redisUrl) {
       var ru   = require('url').parse(redisUrl);
       var redis = require('redis');