Conversation
Collaborator
Closing as superseded by #2533Thanks for tackling this @bricelb — the Cloudflared reverse-proxy scenario where the WebUI and Hermes Dashboard sit at different hostnames is a real deployment shape and worth supporting. #2533 (@AJV20) merged on May 20 2026 in v0.51.95 and ships the same browser-only dashboard link feature:
That covers the use case in your PR body. If there's something the shipped version doesn't coverIf you run into a specific Cloudflared/reverse-proxy scenario that #2533 doesn't handle correctly (e.g. specific URL shapes, IPv6 hosts in proxy URLs, link sanitization that rejects something valid), open a fresh issue with the URL pattern you need to support and we'll address it. Closing this draft — the feature lives in master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows the Official Hermes Dashboard setting to store an external browser URL, such as a Cloudflared hostname, while preserving the existing SSRF protection for server-side dashboard probes.
Problem
My deployment runs Hermes WebUI behind Cloudflared at one hostname and the official Hermes dashboard behind Cloudflared at another hostname:
https://hermes.example.comhttps://dashboard.example.comhttp://127.0.0.1:9119or0.0.0.0:9119on the serverThe dashboard settings currently reject non-loopback URLs, so
https://dashboard.example.com,http://ai.lan:9119, and similar browser-reachable dashboard URLs fail to save. Loopback URLs likehttp://127.0.0.1:9119save, but the frontend derives a browser URL from the WebUI hostname and dashboard port. In a proxied deployment this can produce a broken dashboard link instead of opening the public dashboard hostname.Approach
normalize_dashboard_url()unchanged as the loopback-only server-side probe validator.normalize_dashboard_link_url()for browser-facing dashboard links. This accepts externalhttp/httpsbase URLs, rejects credentials, paths, query strings, fragments, and invalid ports, and marks whether the URL is loopback.automode with an external browser link, still probe only the default loopback dashboard targets before showing the link.alwaysmode with an external browser link, return the external URL directly withexternal: true.status.urldirectly whenexternalis true and avoid showing the loopback-only warning for external browser links.Security notes
The server never probes arbitrary external hosts.
probe_official_dashboard()still rejects non-loopback hosts, and external URLs are only returned to the browser as links.Validation
Ran the targeted dashboard tests in the project environment:
python -m pytest tests/test_dashboard_probe.py tests/test_dashboard_link_ui.pyResult:
18 passed.