Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hermes_cli/web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ def _is_accepted_host(host_header: str, bound_host: str) -> bool:
if bound_host in ("0.0.0.0", "::"):
return True

# Extra hosts from environment (reverse proxy domains)
_extra_hosts = os.environ.get("HERMES_DASHBOARD_EXTRA_HOSTS", "")
if _extra_hosts:
extra = {h.strip().lower() for h in _extra_hosts.split(",") if h.strip()}
if host_only in extra:
return True

# Loopback bind: accept the loopback names
bound_lc = bound_host.lower()
if bound_lc in _LOOPBACK_HOST_VALUES:
Expand Down