HTTP: main external_host proxies to the last domain-bound target instead of the portal
Author: tootsterCreated Sep 25, 2026Updated Sep 25, 2026
Version: 0.29.1 (release binary, Debian 12)
Setup
http.external_host: wg.example.com- Every HTTP target uses domain binding (
a.wg.example.com,b.wg.example.com, …), as the domain binding docs recommend - SSO login; the session cookie is shared across
*.wg.example.com(by design, per #1626)
Steps
- Log in at
https://wg.example.com/@warpgate - Open target A at
https://a.wg.example.com/ - In another tab, go to
https://wg.example.com/
Actual
https://wg.example.com/ is proxied to target A instead of showing the target list.
- If target A is down, the main URL returns a 502, and the only way back to the portal is typing
/@warpgateby hand. - A tab left open on a bound target that polls in the background keeps resetting it, so the main URL keeps jumping to whichever app was used last.
Expected
A domain-bound target lives on its own host. The main host should redirect to /@warpgate unless the user explicitly picked a non-bound target there with ?warpgate-target=.
Cause
catchall_endpointstores every served target in the session (catchall.rs#L52), including targets reached through their bound domain.- On the main host there's no host match, so
get_target_for_requestfalls back tosession.get_target_name()(catchall.rs#L195-L201).
Possible fix
Either of these:
- skip
set_target_namewhen the target was selected by host binding, or - in the session fallback, ignore a remembered target whose
external_hostdiffers from the request host.
Non-bound targets on the main host would keep working as they do now.
Related: #1626, #1868, discussion #2005.
Source: warp-tech/warpgate