1
1
'use strict'
2
2
3
+ /** @type {import('@adonisjs/framework/src/Env') } */
3
4
const Env = use ( 'Env' )
4
5
5
6
module . exports = {
7
+
8
+ /*
9
+ |--------------------------------------------------------------------------
10
+ | Application Name
11
+ |--------------------------------------------------------------------------
12
+ |
13
+ | This value is the name of your application and can be used when you
14
+ | need to place the application's name in a email, view or
15
+ | other location.
16
+ |
17
+ */
18
+
19
+ name : Env . get ( 'APP_NAME' , 'AdonisJs' ) ,
20
+
6
21
/*
7
22
|--------------------------------------------------------------------------
8
23
| App Key
@@ -12,15 +27,15 @@ module.exports = {
12
27
| to encrypted cookies, sessions and other sensitive data.
13
28
|
14
29
*/
15
- appKey : Env . get ( 'APP_KEY' ) ,
30
+ appKey : Env . getOrFail ( 'APP_KEY' ) ,
16
31
17
32
http : {
18
33
/*
19
34
|--------------------------------------------------------------------------
20
35
| Allow Method Spoofing
21
36
|--------------------------------------------------------------------------
22
37
|
23
- | Method spoofing allows to make requests by spoofing the http verb.
38
+ | Method spoofing allows you to make requests by spoofing the http verb.
24
39
| Which means you can make a GET request but instruct the server to
25
40
| treat as a POST or PUT request. If you want this feature, set the
26
41
| below value to true.
@@ -33,10 +48,10 @@ module.exports = {
33
48
| Trust Proxy
34
49
|--------------------------------------------------------------------------
35
50
|
36
- | Trust proxy defines whether X-Forwaded -* headers should be trusted or not.
51
+ | Trust proxy defines whether X-Forwarded -* headers should be trusted or not.
37
52
| When your application is behind a proxy server like nginx, these values
38
53
| are set automatically and should be trusted. Apart from setting it
39
- | to true or false Adonis supports handful or ways to allow proxy
54
+ | to true or false Adonis supports a handful of ways to allow proxy
40
55
| values. Read documentation for that.
41
56
|
42
57
*/
@@ -47,7 +62,7 @@ module.exports = {
47
62
| Subdomains
48
63
|--------------------------------------------------------------------------
49
64
|
50
- | Offset to be used for returning subdomains for a given request.For
65
+ | Offset to be used for returning subdomains for a given request. For
51
66
| majority of applications it will be 2, until you have nested
52
67
| sudomains.
53
68
| cheatsheet.adonisjs.com - offset - 2
@@ -67,12 +82,13 @@ module.exports = {
67
82
*/
68
83
jsonpCallback : 'callback' ,
69
84
85
+
70
86
/*
71
87
|--------------------------------------------------------------------------
72
88
| Etag
73
89
|--------------------------------------------------------------------------
74
90
|
75
- | Set etag on all HTTP response . In order to disable for selected routes,
91
+ | Set etag on all HTTP responses . In order to disable for selected routes,
76
92
| you can call the `response.send` with an options object as follows.
77
93
|
78
94
| response.send('Hello', { ignoreEtag: true })
@@ -100,9 +116,9 @@ module.exports = {
100
116
| Dot Files
101
117
|--------------------------------------------------------------------------
102
118
|
103
- | Define how to treat dot files when trying to server static resources.
119
+ | Define how to treat dot files when trying to serve static resources.
104
120
| By default it is set to ignore, which will pretend that dotfiles
105
- | does not exists .
121
+ | do not exist .
106
122
|
107
123
| Can be one of the following
108
124
| ignore, deny, allow
@@ -206,5 +222,22 @@ module.exports = {
206
222
filename : 'adonis.log' ,
207
223
level : 'info'
208
224
}
225
+ } ,
226
+
227
+ /*
228
+ |--------------------------------------------------------------------------
229
+ | Generic Cookie Options
230
+ |--------------------------------------------------------------------------
231
+ |
232
+ | The following cookie options are generic settings used by AdonisJs to create
233
+ | cookies. However, some parts of the application like `sessions` can have
234
+ | seperate settings for cookies inside `config/session.js`.
235
+ |
236
+ */
237
+ cookie : {
238
+ httpOnly : true ,
239
+ sameSite : false ,
240
+ path : '/' ,
241
+ maxAge : 7200
209
242
}
210
243
}
0 commit comments