mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
The bind address never changes for an app's lifetime, so create_app now canonicalises it and computes the wildcard flag and allowed Host set once instead of on every request. _WILDCARD_HOSTS duplicated what ip_address().is_unspecified already answers (only "" needs a special case), the Sec-Fetch-Site sets become named module constants, and fetch_site is a required argument so no caller can silently skip that check. The 403 message now says what is actually refused (browser requests and foreign Host names) rather than implying every non-local client is. The parametrized proxy test asserted 200-vs-"some 4xx" via a tuple comparison; it now pins status == 200/403 and the exact upstream request count, so a regression to a different status or a leaked forward fails.