Repository navigation
hono: add maxBodyBytes guard for JSON parsing - #1493
TheodorNEngoy wants to merge 4 commits into
Conversation
🦋 Changeset detectedLatest commit: 74cfc3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
|
Added a changeset so this results in a patch bump for Behavior recap: adds |
felixweinberger
left a comment
There was a problem hiding this comment.
Thanks - what prompted this PR, is this an issue you actually ran into?
|
@claude review |
|
Thanks for the PR. #2698 gave |
createMcpHonoApp()includes a built-in JSON body parser that currently reads the full request body.This PR adds a
maxBodyBytesoption (default:1_000_000) and enforces it when parsingapplication/jsonbodies, returning413 Payload too largewhen exceeded. This provides a basic DoS guard while keeping the behavior configurable.Includes tests + README option docs.