Website: increase body parser limit (#13334)

Closes: #13315
Changes:
- Increased the limit of the Fleet website's body parser. (1mb » 2mb)
This commit is contained in:
Eric 2023-08-15 21:35:21 -05:00 committed by GitHub
parent a36cb76733
commit 003e23843e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ module.exports.http = {
var skipper = require('skipper');
var middlewareFn = skipper({
strict: true,
limit: '1MB',// [?] https://github.com/expressjs/body-parser/tree/ee91374eae1555af679550b1d2fb5697d9924109#limit-1
limit: '2MB',// [?] https://github.com/expressjs/body-parser/tree/ee91374eae1555af679550b1d2fb5697d9924109#limit-1
onBodyParserError: (err, req, res)=>{
// If an error occurs while parsing an incoming request body, we'll return a badRequest response if error.statusCode is between 400-500
if (_.isNumber(err.statusCode) && err.statusCode >= 400 && err.statusCode < 500) {