mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
Three dashboard surfaces fetched a RELATIVE /api/v1/... path. That cannot resolve in a static export — there is no server at that origin — so the observability panel, the services grid and the AI chat were dead on every deployed host. It also violates the v1-only rule: the prefix is /v1, never /api. They now call the host-derived origin at /v1/... Deleted app/api/health/route.ts, which emitted out/api/health — an /api/ path SHIPPED INSIDE the artifact. The deeper fix is the duplication. lib/fleet.ts kept a PRIVATE copy of the "brand apiUrl, else build-time default" resolver. A second private copy of exactly that logic, in lib/auth.tsx, shadowed its own import and called itself — infinite recursion that killed every checkAuth/login/register on any host classified as local, i.e. all of local development. That copy is already gone; this removes the other one. apiBase now lives once, exported from lib/api.ts beside getApiUrl, and fleet.ts imports it. Left alone deliberately: the /api/v1 strings in app/products/mpc are curl examples for a CUSTOMER's own host, not calls this app makes. Console compiles clean. Co-authored-by: Hanzo Dev <[email protected]>