set expiryDate for session (#50)
This commit is contained in:
commit
c73e64c9c4
|
@ -23,6 +23,7 @@ module.exports = class Server {
|
|||
|
||||
constructor() {
|
||||
// Express
|
||||
const expiryDate = new Date(Date.now() + 60 * 60 * 1000); // 1 hour
|
||||
this.app = express()
|
||||
.disable('etag')
|
||||
.use('/', express.static(path.join(__dirname, '..', 'www')))
|
||||
|
@ -33,6 +34,7 @@ module.exports = class Server {
|
|||
saveUninitialized: true,
|
||||
cookie: {
|
||||
httpOnly: true,
|
||||
expires: expiryDate,
|
||||
},
|
||||
}))
|
||||
|
||||
|
|
Loading…
Reference in New Issue