diff --git a/config/bodyparser.ts b/config/bodyparser.ts index 7e836e6..9d8795c 100644 --- a/config/bodyparser.ts +++ b/config/bodyparser.ts @@ -73,6 +73,21 @@ const bodyParserConfig = defineConfig({ */ types: ['multipart/form-data'], }, + + /** + * Config for raw/text body parsing. + * CWMP/TR-069 uses text/xml. A GetParameterNamesResponse can easily + * exceed the default 56kb limit on devices with many parameters. + */ + raw: { + limit: '4mb', + types: [ + 'text/xml', + 'application/xml', + 'application/soap+xml', + 'text/plain', + ], + }, }) export default bodyParserConfig