fix(dashboard): allow reverse proxy hosts#25173
Conversation
|
Hey @farena-ai — flagged by the duplicate-detector bot alongside several other PRs solving similar dashboard-host-allowlist problems. Wanted to share one observation in case it's useful. The placement of the extras check matters for the DNS-rebinding defence. In this PR the check runs before the bind discrimination: if host_only in extra_hosts:
return True
if bound_host in {"0.0.0.0", "::"}:
return True
# ... loopback branch ...
# ... explicit non-loopback branch ...That means setting I opened #29195 which gates the extras check inside the loopback-bind branch so the explicit-non-loopback case stays strict, with a regression test for that exact scenario ( |
Summary
HERMES_DASHBOARD_ALLOWED_HOSTS.Files changed
hermes_cli/web_server.pytests/hermes_cli/test_dashboard_allowed_hosts.pyTest commands/results
Result:
Live impact
Restart/reload needed
Known caveats