Expensive time of day
I can not understand why the maxAge settings from the configurator do not work:
app.use(cookieSession({ name: 'sessiondata', keys: ['key1', 'key2'], cookie: { //secure: true, //httpOnly: true, //domain: 'example.com', //path: 'foo/bar', maxAge: 1 } }) );
With this indication, maxAge manually works:
app.get('/login', function(req, res, next) { res.cookie('id', 'lol'); //не работает res.cookie('id2', '2222222', { maxAge: 1222});//работает res.send(req.cookies.id+req.cookies.id2); //res.render('login'); });
maxAge: a number representing the milliseconds from Date.now() for expiry
) - Yaant