Skip to main content

modkit_http/
security.rs

1//! HTTP security utilities.
2
3/// Maximum body preview size for error messages (8KB).
4///
5/// When an HTTP request returns a non-2xx status, the response body is included
6/// in the error message for debugging. This constant limits how much of the body
7/// is read to prevent memory issues with large error responses.
8pub const ERROR_BODY_PREVIEW_LIMIT: usize = 8 * 1024;