pub async fn proxy_handler(
__arg0: State<AppState>,
__arg1: Path<(String, String)>,
req: Request,
) -> ResponseExpand description
ANY /proxy/{daemon}/{*path} — reverse-proxy to the daemon’s live URL.
Why: Lets operators and the console SPA reach every daemon API through the
console port without knowing per-daemon port numbers.
What: Resolves the daemon’s base URL from the background health-poll cache,
forwards the request (method, safe headers, body) via reqwest, and streams
the upstream response back. Unknown daemon IDs → 400; daemon not reachable
→ 502.
Test: URL construction is unit-tested in tests below. End-to-end proxy
behaviour requires a live daemon and is not tested in CI.