feat(config): add generic cookie options
This commit is contained in:
parent
b95abf4364
commit
428f49c801
|
@ -4,6 +4,20 @@
|
|||
const Env = use('Env')
|
||||
|
||||
module.exports = {
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application and can used when you
|
||||
| need to place the application's name in a email, view or
|
||||
| other location.
|
||||
|
|
||||
*/
|
||||
|
||||
name: Env.get('APP_NAME', 'AdonisJs'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| App Key
|
||||
|
@ -13,7 +27,7 @@ module.exports = {
|
|||
| to encrypted cookies, sessions and other sensitive data.
|
||||
|
|
||||
*/
|
||||
appKey: Env.get('APP_KEY'),
|
||||
appKey: Env.getOrFail('APP_KEY'),
|
||||
|
||||
http: {
|
||||
/*
|
||||
|
@ -68,6 +82,7 @@ module.exports = {
|
|||
*/
|
||||
jsonpCallback: 'callback',
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Etag
|
||||
|
@ -207,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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user