secret: process.env.ZOMBOCOM_SESSION_SECRET,
resave: false,
saveUninitialized: true,
- rolling: true
+ rolling: true,
+ // Let each cookie live for a full month
+ cookie: {
+ path: '/',
+ httpOnly: true,
+ secure: false,
+ maxAge: 1000 * 60 * 60 * 24 * 30
+ }
});
app.use(session_middleware);
res.sendFile(__dirname + '/index.html');
});
-app.get('/tardis', (req, res) => {
+function tardis_app(req, res) {
res.sendFile(__dirname + '/tardis.html');
-});
-
-app.get('/tardis/', (req, res) => {
- res.sendFile(__dirname + '/tardis.html');
-});
+}
-app.get('/tardis/index.html', (req, res) => {
- res.sendFile(__dirname + '/tardis.html');
-});
+app.get('/tardis', tardis_app);
+app.get('/tardis/', tardis_app);
io.on('connection', (socket) => {