//! HTTP middleware — defence against cross-origin / DNS-rebinding attacks. //! //! Two layers: //! - [`require_local_host`] — rejects requests whose `Host:` header is not //! exactly `localhost:8747` or `127.0.0.1:8747`. Blocks DNS-rebinding //! (attacker points `a.evil.com` → 127.0.0.1 while browser still trusts //! the evil.com origin for Same-Origin-Policy purposes). //! - [`require_json_content_type`] — rejects `POST /forge` unless body is //! `application/json`. Blocks CSRF via `