From 9e82420462cb856be3b51a0d92da58afe197f4ec Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Mon, 1 Oct 2018 20:19:53 +0200 Subject: [PATCH] feat(config): add generic cookie options --- config/app.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/config/app.js b/config/app.js index 91b62f0..909e2e2 100644 --- a/config/app.js +++ b/config/app.js @@ -27,7 +27,7 @@ module.exports = { | to encrypted cookies, sessions and other sensitive data. | */ - appKey: Env.get('APP_KEY'), + appKey: Env.getOrFail('APP_KEY'), http: { /* @@ -222,5 +222,22 @@ module.exports = { filename: 'adonis.log', level: 'info' } + }, + + /* + |-------------------------------------------------------------------------- + | Generic Cookie Options + |-------------------------------------------------------------------------- + | + | The following cookie options are generic settings used by AdonisJs to create + | cookies. However, some parts of the application like `sessions` can have + | seperate settings for cookies inside `config/session.js`. + | + */ + cookie: { + httpOnly: true, + sameSite: false, + path: '/', + maxAge: 7200 } }