A rolling session is a session that expires in a set amount of time should there be no user activity(excluding websockets live updating data). If the user visits another par
Changing the Express dependency in Sails is not something we take lightly. But in the meantime, you can handle this in a couple of ways, depending on the conditions you'd like to trigger the cookie refresh:
config/policies:
'*': 'refreshSessionCookie'
api/policies/refreshSessionCookie:
module.exports = function(req, res, next) {
req.session._garbage = Date();
req.session.touch();
return next();
}
config/http.js:
middleware: {
refreshSessionCookie: function(req, res, next) {
req.session._garbage = Date();
req.session.touch();
return next();
},
order: [
'startRequestTimer',
'cookieParser',
'session',
'refreshSessionCookie', // <-- your custom middleware
'bodyParser',
'handleBodyParserError',
'compress',
'methodOverride',
'poweredBy',
'$custom',
'router',
'www',
'favicon',
'404',
'500'
]
}