feat(server): add raw body parsing for multipart/form-data and application/octet-stream
- Implemented a new middleware to handle raw body parsing for specific content types, allowing for larger payloads up to 5mb. - Enhanced form body serialization to support Buffer input, improving compatibility with various data formats during proxy interactions.
This commit is contained in:
@@ -45,6 +45,10 @@ function serializeFormBody(req) {
|
||||
return req.rawBody;
|
||||
}
|
||||
|
||||
if (Buffer.isBuffer(req.body) && req.body.length > 0) {
|
||||
return req.body.toString('utf8');
|
||||
}
|
||||
|
||||
if (typeof req.body === 'string') {
|
||||
return req.body;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user