fix(dashboard): allow configured reverse proxy hosts - #47903
fix(dashboard): allow configured reverse proxy hosts#47903jeffery-zhang wants to merge 1 commit into
Conversation
|
Duplicate of #20136 — this implements the same dashboard reverse-proxy Host/Origin allowlist feature (here via |
Correction to the earlier "Duplicate of #20136" note: #20136 is now closed, so this PR is no longer a duplicate of a closed item — the |
|
Triage note after a fresh live + cross-PR check:
If maintainers want the env-var mechanism, the useful next step here is probably a rebase and an explicit comparison against #48954. If the preferred API is config-based instead, this may be superseded by #47560 or another config-surface PR. |
|
Thanks for the focused reverse-proxy analysis and regression coverage. The underlying loopback Host/Origin rejection is real, but this implementation uses a configuration surface we do not accept. This automated hermes-sweeper review is closing this under the standing configuration policy:
A focused re-scope to a documented Closed as not-planned per standing maintainer policy ( |
Summary
HERMES_DASHBOARD_ALLOWED_HOSTSWhy
A dashboard can be safely exposed through a local reverse proxy or Cloudflare Tunnel while the FastAPI server remains bound to
127.0.0.1. In that setup, browser WebSocket requests use the publicHost/Origin(for examplehttps://dashboard.example.com), but the backend currently compares them only against the loopback bind host and rejects/api/ptyand/api/eventsupgrades withorigin_mismatch.Binding the dashboard to
0.0.0.0 --insecureworks around this, but it weakens the deployment by exposing the dashboard listener more broadly. This patch keeps the listener loopback-only and adds a narrow, explicit hostname allowlist for reverse-proxied deployments.Testing
python -m pytest tests/test_web_server.py -qpython -m py_compile hermes_cli/web_server.pygit diff --check