You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add request body size control options
Add MaxRequestBodySize enum to control request body capture with options:
- None: Don't capture request body (default)
- Small: Capture up to 1000 bytes
- Medium: Capture up to 10000 bytes
- Always: Capture entire body
Add max_request_body_size field to ClientOptions struct with default value of None
* feat(sentry-actix): Add request body capture functionality
Add support for capturing request bodies in the Sentry middleware for Actix-Web.
This includes:
- Configurable request body size limits (Small/Medium/Always)
- Support for JSON and form-urlencoded content types
- Body capture and restoration logic to maintain request integrity
- Additional span data enrichment
Updates dependencies:
- Add serde_json, actix-http, futures dependencies
* remove unused futures dependency
* remove useless code and dependency, address clippy lints
* remove unnecessary async for should_capture_request_body
* feat: Add MaxRequestBodySize check for request body limits
Implements a method to validate request body sizes against predefined limits:
- None: Don't capture request bodies (default)
- Small: Capture up to 1000 bytes
- Medium: Capture up to 10000 bytes
- Always: Capture entire body
* feat(sentry-actix): Improve request body capture logic
- Add chunked transfer encoding check to prevent capturing chunked requests
- Add strict content-type validation for JSON and form-urlencoded
- Implement content length validation against size limits
* clippy
* feat(core): add explicit size limit option for request body capture
Add new `Explicit(usize)` variant to `MaxRequestBodySize` enum, allowing users
to specify custom maximum request body size limits for event capture.
* remove unnecessary async for should_capture_request_body
* Add copy trait on MaxRequestBodySize
* Remove MaxRequestBodySize::None check
It's already handle by the is_within_size_limit.
* replace unwrap by empty string
* use copy instead of clone for max_request_body_size
* set default max_request_body_size to medium
---------
Co-authored-by: lcian <[email protected]>
0 commit comments