Skip to content

Raise default body parser limit to 20MB #563

Description

@melvincarvalho

Summary

The default request body limit is currently 10MB, set in src/config.js:

bodyLimit: 10 * 1024 * 1024,

Propose raising the default to 20MB (20 * 1024 * 1024).

Motivation

10MB is easy to hit in normal use — e.g. larger git push payloads over the tunnel, media uploads, or bigger RDF documents. Users can already raise the limit via --body-limit / JSS_BODY_LIMIT / createServer({ bodyLimit }), but a more generous out-of-the-box default reduces friction for common workloads.

Proposed change

  • Bump the default in src/config.js from 10 * 1024 * 1024 to 20 * 1024 * 1024
  • Update the --body-limit help text in bin/jss.js (currently says "default 10MB")
  • Adjust test/body-limit.test.js expectations as needed

Notes

The limit remains configurable, so deployments wanting tighter memory-DoS protection can still lower it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions