I have a firebase function that is triggered by a webhook in 3rd party application. They make a post call to my function with application/x-www-urlencoded type and there are more than 1000 parameters in their post body. 1000 is default number of params in body-parser package and when it hits the limit it throws the error.
PayloadTooLargeError: too many parameters at queryparse
(/srv/node_modules/body-parser/lib/types/urlencoded.js:151:13) at parse
(/srv/node_modules/body-parser/lib/types/urlencoded.js:75:9)
As far as I know, firebase function also has express and body-parser running in the background and I was wondering if there is a way to modify these parameter limits. I saw a few examples to modify these settings, however below solution did not work for firebase function since it did not modify actual body-parser running behind the firebase functions.
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({
extended: false,
parameterLimit: 10000,
limit: 1024 * 1024 * 10
}));
Any suggestions or solutions will be appreciated. Thank you.