pub async fn localhost_host_middleware(
req: Request<Body>,
next: Next,
) -> impl IntoResponseExpand description
Axum middleware that rejects requests with non-localhost Host headers.
Prevents DNS rebinding attacks against the dev API (spec section 18.10.1). Returns HTTP 403 if the Host header is missing or does not match a localhost address.