aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.js b/app.js
index 7a70867..2406f56 100644
--- a/app.js
+++ b/app.js
@@ -17,13 +17,14 @@ const app = express();
const redis = require("redis");
const RedisStore = require("connect-redis")(session);
const redisClient = redis.createClient();
+const ttl = 15778800000; // 6 Months
app.use(
session({
store: new RedisStore({ client: redisClient }),
secret: process.env.sessionSecret,
resave: false,
saveUninitialized: true,
- cookie: { secure: false },
+ cookie: { secure: false, expires: new Date(Date.now() + ttl), maxAge: ttl },
}),
);