Exclude specific route from body-parsersing
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Start by comparing the referenced 1.x lib/read.js lines 45-46 with the corresponding 2.x parsing path, then trace how the supplied route middleware reaches the parser. Done means establishing and documenting a supported way to exclude that route, or clearly defining the missing feature and its tests.
Written by the indexing model from the issue text.
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?
- Dominant language
- JavaScript
- Stars
- 5.5k
- Forks
- 802
- Avg merge
- 7h 54m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expressjs/body-parser
-
discuss ideas semver-major
Difficulty 3/5 1-2 days Newbie friendliness 55/100
expressjs/body-parser#780 · 1 comment ·
Maintainers usually reply within 1 day
-
semver-major
Difficulty 5/5 Over a week Newbie friendliness 28/100
expressjs/body-parser#775 · 1 reaction ·
Maintainers usually reply within 1 day
-
deps semver-major
Difficulty 3/5 1-2 days Newbie friendliness 65/100
expressjs/body-parser#758 · 12 comments ·
Maintainers usually reply within 1 day
-
Almost all non-utf8 encodings are incorrectMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
expressjs/body-parser#680 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
expressjs/body-parser#658 ·
Maintainers usually reply within 1 day
All issues in expressjs/body-parser
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OWASP/CheatSheetSeries#3018 ·
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
GoogleChrome/modern-web-guidance-src#3675 · 2 comments ·
Maintainers usually reply within 1 day