Explorar o código

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

Enable custom session name with SESSION_NAME env var
Yuki Takei %!s(int64=8) %!d(string=hai) anos
pai
achega
b392119531
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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');