From 9a0b2d26ac1180510d89c2c03edaadd89af535e9 Mon Sep 17 00:00:00 2001 From: Jack Singer Date: Wed, 22 Jul 2026 17:04:52 -0500 Subject: [PATCH 1/2] fix(client): route gateway same-origin for any deployment subdomain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gateway base was chosen by comparing the live host to the build-time-baked VITE_BOOL_SLUG (location.host === `${slug}.${appHost}`). Vite inlines VITE_* at build time, so when a project's slug/domain is changed after the bundle is built, the baked slug goes stale: the app is served at `.`, the exact match fails, and the client falls through to an absolute `${appOrigin}/served/` gateway URL. That slug no longer exists, so every gateway call 404s — most visibly the "Continue with Google" navigation, which opens a tab straight onto the 404. The platform proxy resolves the gateway slug from the REQUEST host, not the baked slug, so any `