fix(apps): build browser relay/control URLs from public origin (VAPP-41) #52
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VAPP-41-split-internal-public-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Terminal/files/desktop tabs open but never connect, with no agent-side error. Root cause: the SPA builds the browser-direct relay and control WebSocket URLs from
VERVAIN_SERVER_URL, which is the internal apps-server-to-vervain-server address (http://vervain-server:8080). The browser cannot resolve the internal docker name, cannot reach:8080, andws://is mixed-content-blocked on the https page, so the relay socket fails at construction. vervain-server never sees the browser half; the agent dials and stashes correctly under the sameidbut waits forever for a peer.This surfaced after the server port split (public browser origin is now
https://api.vervain.a8n.systems:443, distinct from the internal:8080). One env var cannot serve both roles.Changes
Split
VERVAIN_SERVER_URLinto two explicit vars:VERVAIN_SERVER_INTERNAL_URL: every server-to-server hop (control connect, login/logout/setup/enroll proxies).server_base_urlrenamedinternal_base_url.VERVAIN_SERVER_PUBLIC_URL: the browser-reachable origin, used only by the two browser-direct buildersbrowser_relay_url(mod.rs) andbrowser_control_url(control.rs). Newpublic_base_url.Only two of the ten call sites are browser-direct (
open_relay_tunnel,get_control_token); the rest stay internal. Also: Settings shows both URLs read-only (so a misconfigured public origin is diagnosable at a glance),main.rswarns separately when each var is unset, and the deploy template + README document both. The sharedcontrol_urlscheme-error is made var-agnostic since it serves both paths.Breaking config change: deployments must set both
VERVAIN_SERVER_INTERNAL_URLandVERVAIN_SERVER_PUBLIC_URLon the vervain-apps container.Testing
just pre-commitgreen (fmt, clippy-D warnings, server + wasm check, bin tests). End-to-end relay pairing needs a deploy with both vars set; verify by opening a terminal tab and confirming vervain-server logs a browser-side relay stash/join for the sameid.Fixes VAPP-41. Relates to VA-77 (the agent side of the same relay path).
🤖 Generated with Claude Code