aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/app.js23
-rw-r--r--config/auth.js17
-rw-r--r--config/bodyParser.js21
-rw-r--r--config/cors.js5
-rw-r--r--config/database.js21
-rw-r--r--config/drive.js17
-rw-r--r--config/hash.js11
-rw-r--r--config/session.js13
-rw-r--r--config/shield.js13
9 files changed, 65 insertions, 76 deletions
diff --git a/config/app.js b/config/app.js
index 4b4f7a5..4d36c7b 100644
--- a/config/app.js
+++ b/config/app.js
@@ -1,7 +1,6 @@
1'use strict'
2 1
3/** @type {import('@adonisjs/framework/src/Env')} */ 2/** @type {import('@adonisjs/framework/src/Env')} */
4const Env = use('Env') 3const Env = use('Env');
5 4
6module.exports = { 5module.exports = {
7 6
@@ -94,7 +93,7 @@ module.exports = {
94 | response.send('Hello', { ignoreEtag: true }) 93 | response.send('Hello', { ignoreEtag: true })
95 | 94 |
96 */ 95 */
97 etag: false 96 etag: false,
98 }, 97 },
99 98
100 views: { 99 views: {
@@ -107,7 +106,7 @@ module.exports = {
107 | production to optimize view loading time. 106 | production to optimize view loading time.
108 | 107 |
109 */ 108 */
110 cache: Env.get('CACHE_VIEWS', true) 109 cache: Env.get('CACHE_VIEWS', true),
111 }, 110 },
112 111
113 static: { 112 static: {
@@ -146,7 +145,7 @@ module.exports = {
146 | that exists will be served. Example: ['html', 'htm']. 145 | that exists will be served. Example: ['html', 'htm'].
147 | 146 |
148 */ 147 */
149 extensions: false 148 extensions: false,
150 }, 149 },
151 150
152 locales: { 151 locales: {
@@ -173,7 +172,7 @@ module.exports = {
173 | based on HTTP headers/query string. 172 | based on HTTP headers/query string.
174 | 173 |
175 */ 174 */
176 locale: 'en' 175 locale: 'en',
177 }, 176 },
178 177
179 logger: { 178 logger: {
@@ -202,7 +201,7 @@ module.exports = {
202 console: { 201 console: {
203 driver: 'console', 202 driver: 'console',
204 name: 'adonis-app', 203 name: 'adonis-app',
205 level: 'info' 204 level: 'info',
206 }, 205 },
207 206
208 /* 207 /*
@@ -220,8 +219,8 @@ module.exports = {
220 driver: 'file', 219 driver: 'file',
221 name: 'adonis-app', 220 name: 'adonis-app',
222 filename: 'adonis.log', 221 filename: 'adonis.log',
223 level: 'info' 222 level: 'info',
224 } 223 },
225 }, 224 },
226 225
227 /* 226 /*
@@ -238,6 +237,6 @@ module.exports = {
238 httpOnly: true, 237 httpOnly: true,
239 sameSite: false, 238 sameSite: false,
240 path: '/', 239 path: '/',
241 maxAge: 7200 240 maxAge: 7200,
242 } 241 },
243} 242};
diff --git a/config/auth.js b/config/auth.js
index c70db3f..b831b06 100644
--- a/config/auth.js
+++ b/config/auth.js
@@ -1,7 +1,6 @@
1'use strict'
2 1
3/** @type {import('@adonisjs/framework/src/Env')} */ 2/** @type {import('@adonisjs/framework/src/Env')} */
4const Env = use('Env') 3const Env = use('Env');
5 4
6module.exports = { 5module.exports = {
7 /* 6 /*
@@ -32,7 +31,7 @@ module.exports = {
32 model: 'App/Models/User', 31 model: 'App/Models/User',
33 scheme: 'session', 32 scheme: 'session',
34 uid: 'email', 33 uid: 'email',
35 password: 'password' 34 password: 'password',
36 }, 35 },
37 36
38 /* 37 /*
@@ -53,7 +52,7 @@ module.exports = {
53 model: 'App/Models/User', 52 model: 'App/Models/User',
54 scheme: 'basic', 53 scheme: 'basic',
55 uid: 'email', 54 uid: 'email',
56 password: 'password' 55 password: 'password',
57 }, 56 },
58 57
59 /* 58 /*
@@ -72,8 +71,8 @@ module.exports = {
72 uid: 'email', 71 uid: 'email',
73 password: 'password', 72 password: 'password',
74 options: { 73 options: {
75 secret: Env.get('APP_KEY') 74 secret: Env.get('APP_KEY'),
76 } 75 },
77 }, 76 },
78 77
79 /* 78 /*
@@ -89,6 +88,6 @@ module.exports = {
89 model: 'App/Models/User', 88 model: 'App/Models/User',
90 scheme: 'api', 89 scheme: 'api',
91 uid: 'email', 90 uid: 'email',
92 password: 'password' 91 password: 'password',
93 } 92 },
94} 93};
diff --git a/config/bodyParser.js b/config/bodyParser.js
index f04d291..c336e67 100644
--- a/config/bodyParser.js
+++ b/config/bodyParser.js
@@ -1,4 +1,3 @@
1'use strict'
2 1
3module.exports = { 2module.exports = {
4 /* 3 /*
@@ -47,8 +46,8 @@ module.exports = {
47 'application/json', 46 'application/json',
48 'application/json-patch+json', 47 'application/json-patch+json',
49 'application/vnd.api+json', 48 'application/vnd.api+json',
50 'application/csp-report' 49 'application/csp-report',
51 ] 50 ],
52 }, 51 },
53 52
54 /* 53 /*
@@ -61,8 +60,8 @@ module.exports = {
61 */ 60 */
62 raw: { 61 raw: {
63 types: [ 62 types: [
64 'text/*' 63 'text/*',
65 ] 64 ],
66 }, 65 },
67 66
68 /* 67 /*
@@ -75,8 +74,8 @@ module.exports = {
75 */ 74 */
76 form: { 75 form: {
77 types: [ 76 types: [
78 'application/x-www-form-urlencoded' 77 'application/x-www-form-urlencoded',
79 ] 78 ],
80 }, 79 },
81 80
82 /* 81 /*
@@ -89,7 +88,7 @@ module.exports = {
89 */ 88 */
90 files: { 89 files: {
91 types: [ 90 types: [
92 'multipart/form-data' 91 'multipart/form-data',
93 ], 92 ],
94 93
95 /* 94 /*
@@ -133,7 +132,7 @@ module.exports = {
133 | is to true. Otherwise everything is processed manually. 132 | is to true. Otherwise everything is processed manually.
134 | 133 |
135 */ 134 */
136 processManually: [] 135 processManually: [],
137 136
138 /* 137 /*
139 |-------------------------------------------------------------------------- 138 |--------------------------------------------------------------------------
@@ -153,5 +152,5 @@ module.exports = {
153 | } 152 | }
154 | 153 |
155 */ 154 */
156 } 155 },
157} 156};
diff --git a/config/cors.js b/config/cors.js
index ffc1951..7ebbe3f 100644
--- a/config/cors.js
+++ b/config/cors.js
@@ -1,4 +1,3 @@
1'use strict'
2 1
3module.exports = { 2module.exports = {
4 /* 3 /*
@@ -83,5 +82,5 @@ module.exports = {
83 | Define Access-Control-Allow-Max-Age 82 | Define Access-Control-Allow-Max-Age
84 | 83 |
85 */ 84 */
86 maxAge: 90 85 maxAge: 90,
87} 86};
diff --git a/config/database.js b/config/database.js
index a7a2776..0e9cfba 100644
--- a/config/database.js
+++ b/config/database.js
@@ -1,10 +1,9 @@
1'use strict'
2 1
3/** @type {import('@adonisjs/framework/src/Env')} */ 2/** @type {import('@adonisjs/framework/src/Env')} */
4const Env = use('Env') 3const Env = use('Env');
5 4
6/** @type {import('@adonisjs/ignitor/src/Helpers')} */ 5/** @type {import('@adonisjs/ignitor/src/Helpers')} */
7const Helpers = use('Helpers') 6const Helpers = use('Helpers');
8 7
9module.exports = { 8module.exports = {
10 /* 9 /*
@@ -32,10 +31,10 @@ module.exports = {
32 sqlite: { 31 sqlite: {
33 client: 'sqlite3', 32 client: 'sqlite3',
34 connection: { 33 connection: {
35 filename: Helpers.databasePath(`${Env.get('DB_DATABASE', 'development')}.sqlite`) 34 filename: Helpers.databasePath(`${Env.get('DB_DATABASE', 'development')}.sqlite`),
36 }, 35 },
37 useNullAsDefault: true, 36 useNullAsDefault: true,
38 debug: Env.get('DB_DEBUG', false) 37 debug: Env.get('DB_DEBUG', false),
39 }, 38 },
40 39
41 /* 40 /*
@@ -55,9 +54,9 @@ module.exports = {
55 port: Env.get('DB_PORT', ''), 54 port: Env.get('DB_PORT', ''),
56 user: Env.get('DB_USER', 'root'), 55 user: Env.get('DB_USER', 'root'),
57 password: Env.get('DB_PASSWORD', ''), 56 password: Env.get('DB_PASSWORD', ''),
58 database: Env.get('DB_DATABASE', 'adonis') 57 database: Env.get('DB_DATABASE', 'adonis'),
59 }, 58 },
60 debug: Env.get('DB_DEBUG', false) 59 debug: Env.get('DB_DEBUG', false),
61 }, 60 },
62 61
63 /* 62 /*
@@ -77,8 +76,8 @@ module.exports = {
77 port: Env.get('DB_PORT', ''), 76 port: Env.get('DB_PORT', ''),
78 user: Env.get('DB_USER', 'root'), 77 user: Env.get('DB_USER', 'root'),
79 password: Env.get('DB_PASSWORD', ''), 78 password: Env.get('DB_PASSWORD', ''),
80 database: Env.get('DB_DATABASE', 'adonis') 79 database: Env.get('DB_DATABASE', 'adonis'),
81 }, 80 },
82 debug: Env.get('DB_DEBUG', false) 81 debug: Env.get('DB_DEBUG', false),
83 } 82 },
84} 83};
diff --git a/config/drive.js b/config/drive.js
index 901e699..617ce47 100644
--- a/config/drive.js
+++ b/config/drive.js
@@ -1,7 +1,4 @@
1'use strict' 1const Env = use('Env');
2
3const Helpers = use('Helpers')
4const Env = use('Env')
5 2
6module.exports = { 3module.exports = {
7 /* 4 /*
@@ -25,8 +22,8 @@ module.exports = {
25 | 22 |
26 */ 23 */
27 local: { 24 local: {
28 root: __dirname + '/../recipes', 25 root: `${__dirname}/../recipes`,
29 driver: 'local' 26 driver: 'local',
30 }, 27 },
31 28
32 /* 29 /*
@@ -42,7 +39,7 @@ module.exports = {
42 key: Env.get('S3_KEY'), 39 key: Env.get('S3_KEY'),
43 secret: Env.get('S3_SECRET'), 40 secret: Env.get('S3_SECRET'),
44 bucket: Env.get('S3_BUCKET'), 41 bucket: Env.get('S3_BUCKET'),
45 region: Env.get('S3_REGION') 42 region: Env.get('S3_REGION'),
46 } 43 },
47 } 44 },
48} 45};
diff --git a/config/hash.js b/config/hash.js
index 42f5805..297c977 100644
--- a/config/hash.js
+++ b/config/hash.js
@@ -1,7 +1,6 @@
1'use strict'
2 1
3/** @type {import('@adonisjs/framework/src/Env')} */ 2/** @type {import('@adonisjs/framework/src/Env')} */
4const Env = use('Env') 3const Env = use('Env');
5 4
6module.exports = { 5module.exports = {
7 /* 6 /*
@@ -25,7 +24,7 @@ module.exports = {
25 | 24 |
26 */ 25 */
27 bcrypt: { 26 bcrypt: {
28 rounds: 10 27 rounds: 10,
29 }, 28 },
30 29
31 /* 30 /*
@@ -44,6 +43,6 @@ module.exports = {
44 | 43 |
45 */ 44 */
46 argon: { 45 argon: {
47 type: 1 46 type: 1,
48 } 47 },
49} 48};
diff --git a/config/session.js b/config/session.js
index f49b9b7..bce28bd 100644
--- a/config/session.js
+++ b/config/session.js
@@ -1,6 +1,5 @@
1'use strict'
2 1
3const Env = use('Env') 2const Env = use('Env');
4 3
5module.exports = { 4module.exports = {
6 /* 5 /*
@@ -65,7 +64,7 @@ module.exports = {
65 cookie: { 64 cookie: {
66 httpOnly: true, 65 httpOnly: true,
67 path: '/', 66 path: '/',
68 sameSite: false 67 sameSite: false,
69 }, 68 },
70 69
71 /* 70 /*
@@ -78,7 +77,7 @@ module.exports = {
78 | 77 |
79 */ 78 */
80 file: { 79 file: {
81 location: 'sessions' 80 location: 'sessions',
82 }, 81 },
83 82
84 /* 83 /*
@@ -94,6 +93,6 @@ module.exports = {
94 port: 6379, 93 port: 6379,
95 password: null, 94 password: null,
96 db: 0, 95 db: 0,
97 keyPrefix: '' 96 keyPrefix: '',
98 } 97 },
99} 98};
diff --git a/config/shield.js b/config/shield.js
index 3d4526a..5c1c5cd 100644
--- a/config/shield.js
+++ b/config/shield.js
@@ -1,4 +1,3 @@
1'use strict'
2 1
3module.exports = { 2module.exports = {
4 /* 3 /*
@@ -64,7 +63,7 @@ module.exports = {
64 | if you want to know the behavior. https://github.com/helmetjs/helmet/pull/82 63 | if you want to know the behavior. https://github.com/helmetjs/helmet/pull/82
65 | 64 |
66 */ 65 */
67 disableAndroid: true 66 disableAndroid: true,
68 }, 67 },
69 68
70 /* 69 /*
@@ -80,7 +79,7 @@ module.exports = {
80 */ 79 */
81 xss: { 80 xss: {
82 enabled: true, 81 enabled: true,
83 enableOnOldIE: false 82 enableOnOldIE: false,
84 }, 83 },
85 84
86 /* 85 /*
@@ -139,7 +138,7 @@ module.exports = {
139 httpOnly: false, 138 httpOnly: false,
140 sameSite: true, 139 sameSite: true,
141 path: '/', 140 path: '/',
142 maxAge: 7200 141 maxAge: 7200,
143 } 142 },
144 } 143 },
145} 144};