-
Notifications
You must be signed in to change notification settings - Fork 177
feat: add body limit config option for streamable HTTP #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a configurable httpBodyLimit option to control the maximum size of HTTP request bodies when using HTTP transport, addressing PayloadTooLargeError issues with large JSON payloads.
- Adds
httpBodyLimitconfiguration option with a default of "100kb" - Updates Express.js middleware to use the configured limit
- Documents the new option in README with environment variable and CLI flag
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/transports/streamableHttp.ts | Updates Express.js JSON middleware to use the configured body limit |
| src/common/config/userConfig.ts | Adds the httpBodyLimit configuration schema with default value and description |
| README.md | Documents the new configuration option in the configuration table |
e6a6354 to
ac17be5
Compare
Adds a new configuration option to control the maximum size of HTTP request bodies when using the HTTP transport. This addresses PayloadTooLargeError issues when clients send large JSON payloads. - Default value: 100kb (Express.js default) - Supports formats like '100kb', '1mb', '50mb' - Only applies when transport is 'http' Includes: - Unit tests for config parsing (CLI and env vars) - Integration tests for body limit enforcement - Updated configOverrides test for not-allowed fields
ac17be5 to
f5d6cbc
Compare
Pull Request Test Coverage Report for Build 20468981427Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 20468948459Details
💛 - Coveralls |
Proposed changes
Adds a new configuration option to control the maximum size of HTTP request bodies when using the HTTP transport. This addresses
PayloadTooLargeErrorissues when clients send large JSON payloads.Checklist