pub async fn origin_guard(
request: Request<Body>,
next: Next,
) -> Result<Response<Body>, StatusCode>Expand description
Axum middleware that blocks cross-origin requests from browsers.
§Errors
Returns StatusCode::FORBIDDEN if the Origin header is present and does
not match a localhost or tauri:// origin.