HEADERS_FILTER

Static HEADERS_FILTER 

Source
pub static HEADERS_FILTER: OnceLock<HeadersFilter>
Expand description

This is uninitialised unless you call crate::bootstrap() or crate::observability::init_tracing() functions. If initialised but env variables are not set fregate will include all headers. Expects string values separated with ‘,’ or standalone “*” character meaning: all. Example:

std::env::set_var("TEST_HEADERS_SANITIZE", "password,login,client_id");
std::env::set_var("TEST_HEADERS_EXCLUDE", "authorization");
std::env::set_var("TEST_HEADERS_INCLUDE", "*");

In crate::extensions::HeaderFilterExt trait implementation will have next behaviour: Include all headers except for “authorization” and sanitize “password,login,client_id” headers.