mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 10:35:51 +00:00
d746731c75
The relay client's HTTP proxy dialed http://127.0.0.1:<FrontendPort> for every proxied mobile request. With HTTPS_ENABLED the main listener serves TLS on that port, so Go answered each plaintext dial with a bare "Client sent an HTTP request to an HTTPS server" 400 - breaking Remote Access backlog sync (alerts/approvals) on every HTTPS-enabled instance. A non-loopback BIND_ADDRESS broke the same dial outright. Route proxied requests through the router's own handler chain in-process instead, via a streaming-capable RoundTripper (pipe-backed, SSE flush, panic recovery, loopback RemoteAddr for address-keyed middleware). The listener's scheme and bind address no longer matter, and the request traverses exactly the middleware the real listener serves. Reported by Johannes Strasser (Remote Access thread, 2026-07-14).