Reputation: 1011
I have a web page that uses session variables. How can i set an expire time for a session? eg: after 15 minutes of inactivity , have to destroy the session.
I tried in config/session.js , but in vain.
As i am new to sails.js , please suggest how to achieve this.
Please help. Thanks a lot.
Upvotes: 4
Views: 3523
Reputation: 9045
It should work with
module.exports.session = {
// ...
cookie: {
maxAge: 15*60*1000
}
}
in your config/session.js
.
Upvotes: 4