v3: misc fixes

This commit is contained in:
Matteo Pagliazzi
2016-05-15 15:10:41 +02:00
parent 3fbc156811
commit 0be5d1da9c
9 changed files with 42 additions and 37 deletions

View File

@@ -61,7 +61,8 @@ module.exports = function attachMiddlewares (app, server) {
app.use(cookieSession({
name: 'connect:sess', // Used to keep backward compatibility with Express 3 cookies
secret: SESSION_SECRET,
httpOnly: false, // TODO this should be true for security, what about https only (secure) ?
httpOnly: true, // so cookies are not accessible with browser JS
// TODO what about https only (secure) ?
maxAge: TWO_WEEKS,
}));