Browse Source

Enable custom session name with SESSION_NAME env var

Hitoshi Otsuki 8 years ago
parent
commit
f1af56c1fa
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) {
     if (redisUrl) {
       var ru   = require('url').parse(redisUrl);
       var ru   = require('url').parse(redisUrl);
       var redis = require('redis');
       var redis = require('redis');