Skip to main content

systemprompt_api/services/middleware/
mod.rs

1//! HTTP middleware layers for the API server.
2//!
3//! Collects the request-pipeline concerns mounted by the router: client-address
4//! resolution, CORS and security headers, bot detection and IP banning, rate
5//! limiting, JWT and session context establishment, request-context flavours,
6//! content negotiation, authorization gating, analytics, and tracing.
7
8pub mod analytics;
9pub mod authz;
10pub mod bot_detector;
11pub mod client_addr;
12pub mod context;
13pub mod cors;
14pub mod ip_ban;
15pub mod jwt;
16pub mod negotiation;
17pub mod rate_limit;
18pub mod security_headers;
19pub mod served_by;
20pub mod session;
21pub mod site_auth;
22pub mod trace;
23pub mod trailing_slash;
24
25pub use analytics::*;
26pub use authz::{AuthzPolicy, authz_gate};
27pub use bot_detector::*;
28pub use context::{
29    A2AContextMiddleware, ContextExtractor, McpContextMiddleware, PublicContextMiddleware,
30    UserOnlyContextMiddleware,
31};
32pub use cors::*;
33pub use ip_ban::*;
34pub use jwt::*;
35pub use negotiation::{
36    AcceptedFormat, AcceptedMediaType, content_negotiation_middleware, parse_accept_header,
37};
38pub use rate_limit::*;
39pub use security_headers::*;
40pub use served_by::*;
41pub use session::*;
42pub use site_auth::*;
43pub use trace::*;
44pub use trailing_slash::*;