Expand description
Canonical header extraction for ASH protocol.
This module provides a single, authoritative function for extracting
ASH-required headers from any HTTP framework. Middlewares should use
ash_extract_headers() instead of reimplementing header parsing.
§Why This Exists
Previously, every middleware (Express, FastAPI, Laravel, Gin, etc.) reimplemented header extraction with subtle differences in:
- Case-insensitive lookup
- Multi-value handling
- Whitespace trimming
- Control character rejection
This caused systemic bugs (null nonce bypasses, enum mismatches). Moving extraction into Core eliminates this entire bug class.
Structs§
- Header
Bundle - Extracted ASH headers, validated and trimmed.
Constants§
- HDR_
BODY_ HASH - ASH body hash header name.
- HDR_
CONTEXT_ ID - ASH context ID header name.
- HDR_
NONCE - ASH nonce header name.
- HDR_
PROOF - ASH proof header name.
- HDR_
TIMESTAMP - ASH timestamp header name.
Traits§
- Header
MapView - Framework-agnostic header map interface.
Functions§
- ash_
extract_ headers - Extract and validate all required ASH headers from a request.