Initial commit
This commit is contained in:
26
config/bodyparser.js
Normal file
26
config/bodyparser.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from '@adonisjs/core/bodyparser';
|
||||
const bodyParserConfig = defineConfig({
|
||||
allowedMethods: ['POST', 'PUT', 'PATCH', 'DELETE'],
|
||||
form: {
|
||||
convertEmptyStringsToNull: true,
|
||||
types: ['application/x-www-form-urlencoded'],
|
||||
},
|
||||
json: {
|
||||
convertEmptyStringsToNull: true,
|
||||
types: [
|
||||
'application/json',
|
||||
'application/json-patch+json',
|
||||
'application/vnd.api+json',
|
||||
'application/csp-report',
|
||||
],
|
||||
},
|
||||
multipart: {
|
||||
autoProcess: true,
|
||||
convertEmptyStringsToNull: true,
|
||||
processManually: [],
|
||||
limit: '20mb',
|
||||
types: ['multipart/form-data'],
|
||||
},
|
||||
});
|
||||
export default bodyParserConfig;
|
||||
//# sourceMappingURL=bodyparser.js.map
|
||||
Reference in New Issue
Block a user