Skip to main content

collect_x_headers

Function collect_x_headers 

Source
pub(super) fn collect_x_headers(headers: &HeaderMap) -> XHeaders
Expand description

Collects all headers whose name starts with x- (case-insensitive) into an XHeaders map.

Header names are normalized: lowercase (axum guarantees this) and hyphens replaced with underscores so each key is a valid JSON identifier and can be referenced by log-processing tools that use JSON path notation (e.g. x-example-project → key x_example_project). Headers with non-UTF-8 values are silently skipped.