standalone-hardening 0006: redirect non-editor routes to the mgmt app
VITE_APP_URL (build-editor --app-base, set to app.pcbjam.com in release CI) turns on a redirect gate in App: home, project overview and mgmt-only paths bounce to the mgmt app preserving path+search; tool boots, file deep-links, lib editors and the @local pseudo-scope stay local. Unset (dev/demo) keeps today's behavior. Policy is a pure helper (lib/redirect.ts) + vitest table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A42xfPFNdfsUt9eowkC9eM
This commit is contained in:
parent
36ca706cf0
commit
abb0923f70
8 changed files with 140 additions and 2 deletions
|
|
@ -50,6 +50,16 @@ export const LANDING_URL = (
|
|||
import.meta.env.VITE_LANDING_URL || "https://pcbjam.com"
|
||||
).replace(/\/+$/, "");
|
||||
|
||||
/**
|
||||
* The companion management app's origin (no trailing slash), e.g.
|
||||
* "https://app.pcbjam.com". When set (the backed editor deploy), non-editor
|
||||
* surfaces — home, project overview, mgmt-only paths — redirect there; see
|
||||
* lib/redirect.ts (standalone-hardening 0006). Unset (dev / demo) keeps every
|
||||
* route local.
|
||||
*/
|
||||
export const APP_URL =
|
||||
(import.meta.env.VITE_APP_URL || "").replace(/\/+$/, "") || null;
|
||||
|
||||
/**
|
||||
* Where the in-editor waitlist form POSTs. The demo is a fully static deploy with
|
||||
* no backend, so it cross-posts to the landing site's serverless endpoint (which
|
||||
|
|
|
|||
Loading…
Reference in a new issue