rama_http/layer/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Http [`Layer`]s provided by Rama.
//!
//! A [`Layer`], as defined in [`rama_core::Service`],
//! is a middleware that can modify the request and/or response of a [`Service`]s.
//! It is also capable of branching between two or more [`Service`]s.
//!
//! Examples:
//! - [`auth`]: A layer that can be used to authenticate requests, branching
//!   in case the request is not authenticated (read: rejected).
//! - [`cors`]: A layer that can be used to add CORS headers to the response.
//!
//! Most layers are implemented as a [`Service`], and then wrapped in a [`Layer`].
//! This is done to allow the layer to be used as a service, and to allow it to be
//! composed with other layers.
//!
//! [`Layer`]: rama_core::Layer
//! [`Service`]: rama_core::Service

pub mod auth;
pub mod body_limit;
pub mod catch_panic;
pub mod classify;
pub mod collect_body;
pub mod cors;
pub mod dns;
pub mod error_handling;
pub mod follow_redirect;
pub mod forwarded;
pub mod header_config;
pub mod header_option_value;
pub mod map_request_body;
pub mod map_response_body;
pub mod normalize_path;
pub mod propagate_headers;
pub mod proxy_auth;
pub mod remove_header;
pub mod request_id;
pub mod required_header;
pub mod retry;
pub mod sensitive_headers;
pub mod set_header;
pub mod set_status;
pub mod timeout;
pub mod trace;
pub mod traffic_writer;
pub mod ua;
pub mod validate_request;

#[cfg(feature = "telemetry")]
pub mod opentelemetry;

pub(crate) mod util;

#[cfg(feature = "compression")]
pub mod compression;
#[cfg(feature = "compression")]
pub mod decompression;