Expand description
Request validation middleware for tower services.
tower-request-guard validates incoming requests before they reach
the handler: body size limits, timeouts, content-type enforcement,
required headers, and JSON depth protection.
Re-exports§
pub use guard::RequestGuard;pub use layer::RequestGuardLayer;pub use route::route_guard;pub use service::RequestGuardService;pub use violation::OnViolation;pub use violation::Violation;pub use violation::ViolationAction;
Modules§
- body
- Body size checks and bodyless-method detection.
- content_
type - Content-Type media type matching.
- guard
- Guard configuration and builder.
- headers
- Required header validation.
- layer
- Tower
Layerimplementation. - response
- HTTP error response generation for violations.
- route
- Per-route override configuration via
route_guard. - service
- Tower
Servicethat enforces request validation. - violation
- Violation types, actions, and handling policies.