-
-
Notifications
You must be signed in to change notification settings - Fork 746
Open
Labels
Description
Hi, in the 1.X versione there is https://github.com/expressjs/body-parser/blob/1.x/lib/read.js#L45-L46
// flag as parsed
req._body = true
I have used this flag for exclude a specific route from body parsersing, eg.:
app.use((req, res, next) => {
if ( /^\/api\/wopi\/files\/([a-zA-Z0-9]+)\/contents$/.test(req.path.toLowerCase()) ) {
req['_body'] = true;
}
next();
});
In the 2.X version this flag disappear... How can I exclude a specific route from body parser?