Remove dead jsonLimitForPath abstraction - #273
Merged
willchen96 merged 3 commits intoAug 2, 2026
Merged
Conversation
jsonLimitForPath() ignores its path argument and always returns "50mb", and the per-request middleware wrapper re-invokes express.json() on every request for no effect. Replace with a single static express.json() mount. Behaviour is identical; if per-path body limits are wanted later, happy to implement them properly against a list of routes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
amal66
self-requested a review
July 31, 2026 18:45
amal66
requested changes
Jul 31, 2026
Collaborator
There was a problem hiding this comment.
Having descriptive variable names is better than unnamed strings. Could we please revise this to have a descriptive constant named in all caps at the top of the file, and reusing that?
Some rationale from a related article, under "Why Use constants": https://realpython.com/python-constants/
Per review: a named constant reads better than a bare string at the mount site, and gives the value somewhere to be documented.
willchen96
approved these changes
Aug 2, 2026
Collaborator
|
Merging in as change request has been addressed. Made commit to clarify comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jsonLimitForPath()ignores itspathargument and always returns"50mb", and the per-request wrapper re-invokesexpress.json()on every request for no effect. This replaces both with a single staticexpress.json({ limit: "50mb" })mount.npm run buildpasses; full vitest suite passes (259 passed, 5 skipped)Found while reading the codebase for our fork work (b1rdmania).
🤖 Generated with Claude Code