Skip to content

Add request body size limit configuration #219

Description

@AbelOsaretin

What

express.json() is used with default limits. The default 100KB limit should be explicitly configured and documented.

Why

An explicit limit prevents large-payload denial-of-service attacks and makes the configuration visible.

Scope

  • Set explicit limit option on express.json()
  • Make configurable via BODY_SIZE_LIMIT env var
  • Document the default and how to change it

Acceptance Criteria

  • express.json() configured with explicit limit
  • BODY_SIZE_LIMIT env var supported (default: 100kb)
  • Requests exceeding limit return 413 Payload Too Large
  • Documented in README

Technical Context

  • src/index.ts:16app.use(express.json())
  • Express 5 json() accepts limit option
  • Default: 100kb

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumFunctionality impaired but workaround exists, edge case, partial feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions