|
|
@ -2,14 +2,12 @@ const session = require("express-session") |
|
|
|
const config = require("../config") |
|
|
|
var RedisStore = require('connect-redis')(session); |
|
|
|
|
|
|
|
var sess = { |
|
|
|
module.exports = session({ |
|
|
|
secret: config.session.secret, |
|
|
|
store: new RedisStore(config.redis), |
|
|
|
cookie: {}, |
|
|
|
cookie: { |
|
|
|
secure: config.session.secure |
|
|
|
}, |
|
|
|
resave: false, |
|
|
|
saveUninitialized: true, |
|
|
|
} |
|
|
|
|
|
|
|
sess.cookie.secure = config.session.secure |
|
|
|
|
|
|
|
module.exports = session(sess) |
|
|
|
}) |