Skip to main content

enrich_context_from_headers

Function enrich_context_from_headers 

Source
pub fn enrich_context_from_headers(
    ctx: CoolContext,
    headers: &HeaderMap,
) -> CoolContext
Expand description

Enrich a CoolContext with the request id (from traceparent) and the client IP (from Forwarded/X-Forwarded-For). Malformed traceparent headers are silently ignored here — the auth/header-validation layer is the right place to reject them, not the enrichment seam.