rama_http/layer/
mod.rs

1//! Http [`Layer`]s provided by Rama.
2//!
3//! A [`Layer`], as defined in [`rama_core::Service`],
4//! is a middleware that can modify the request and/or response of a [`Service`]s.
5//! It is also capable of branching between two or more [`Service`]s.
6//!
7//! Examples:
8//! - [`auth`]: A layer that can be used to authenticate requests, branching
9//!   in case the request is not authenticated (read: rejected).
10//! - [`cors`]: A layer that can be used to add CORS headers to the response.
11//!
12//! Most layers are implemented as a [`Service`], and then wrapped in a [`Layer`].
13//! This is done to allow the layer to be used as a service, and to allow it to be
14//! composed with other layers.
15//!
16//! [`Layer`]: rama_core::Layer
17//! [`Service`]: rama_core::Service
18
19pub mod auth;
20pub mod body_limit;
21pub mod catch_panic;
22pub mod classify;
23pub mod collect_body;
24pub mod cors;
25pub mod dns;
26pub mod error_handling;
27pub mod follow_redirect;
28pub mod forwarded;
29pub mod header_config;
30pub mod header_option_value;
31pub mod map_request_body;
32pub mod map_response_body;
33pub mod normalize_path;
34pub mod propagate_headers;
35pub mod proxy_auth;
36pub mod remove_header;
37pub mod request_id;
38pub mod required_header;
39pub mod retry;
40pub mod sensitive_headers;
41pub mod set_header;
42pub mod set_status;
43pub mod timeout;
44pub mod trace;
45pub mod traffic_writer;
46pub mod ua;
47pub mod validate_request;
48
49#[cfg(feature = "telemetry")]
50pub mod opentelemetry;
51
52pub(crate) mod util;
53
54#[cfg(feature = "compression")]
55pub mod compression;
56#[cfg(feature = "compression")]
57pub mod decompression;