pub async fn guard_local_origin(
__arg0: State<Shared>,
req: Request,
next: Next,
) -> ResponseExpand description
Defends the local dashboard against DNS-rebinding and cross-site requests: the Host header
must name a loopback host, and a request that changes something must either come from this
origin or carry the session’s CSRF token (arrival_refusal explains the three ways through).
All responses also get headers that stop framing, sniffing and external loads.