Repository navigation
docs: Clarify that only numeric requestComplexity limits accept -1 - #10909
OpenLucasKaka wants to merge 1 commit into
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Pull Request
Issue
Closes: #10870
The description of the
requestComplexityoption group ends with "Each property can be set to-1to disable that specific limit." That does not hold forrequestComplexity.allowRegex, which is a boolean.requestComplexity: { allowRegex: -1 }fails startup withrequestComplexity.allowRegex must be a boolean.(the validation is covered byspec/RequestComplexity.spec.js, "should reject non-boolean value for allowRegex").Approach
In
src/Options/index.js, change the sentence to "Each numeric property can be set to-1to disable that specific limit." Then regeneratesrc/Options/Definitions.jsandsrc/Options/docs.jswithnpm run definitions. The three lines that held the sentence change, and nothing else does. No behavior change.Verified locally (Node 22.23.5, MongoDB 8.0.4 standalone):
npm run definitionsregenerated the two files.node ci/definitionsCheck.jsexits 0, so the generated files matchindex.js.npx eslint --flag unstable_config_lookup_from_file src/Options/: clean.npm run build, thenTESTING=1 npx jasmine spec/RequestComplexity.spec.js: 85 specs, 0 failures.TESTING=1 npx jasmine spec/buildConfigDefinitions.spec.js spec/ParseConfigKey.spec.js spec/ParseGlobalConfig.spec.js spec/ParseServerRESTController.spec.js: 56 specs, 0 failures.Tasks
No test added: the change is limited to a description string, and the existing definitions check covers that the generated files are in sync.
Summary by CodeRabbit
requestComplexitylimit to-1disables that limit.