fixing redisstore sessions with passworded redis stores

v1.18.x
Julian Lam 12 years ago
parent 49b201db0f
commit b7498416fa

@ -4,8 +4,7 @@ var express = require('express'),
server = require('http').createServer(WebServer), server = require('http').createServer(WebServer),
RedisStore = require('connect-redis')(express), RedisStore = require('connect-redis')(express),
path = require('path'), path = require('path'),
redis = require('redis'), RDB = require('./redis'),
redisServer = redis.createClient(nconf.get('redis:port'), nconf.get('redis:host')),
utils = require('../public/src/utils.js'), utils = require('../public/src/utils.js'),
pkg = require('../package.json'), pkg = require('../package.json'),
fs = require('fs'), fs = require('fs'),
@ -67,7 +66,7 @@ var express = require('express'),
app.use(express.compress()); app.use(express.compress());
app.use(express.session({ app.use(express.session({
store: new RedisStore({ store: new RedisStore({
client: redisServer, client: RDB,
ttl: 60*60*24*30 ttl: 60*60*24*30
}), }),
secret: nconf.get('secret'), secret: nconf.get('secret'),

Loading…
Cancel
Save