/api/v1 (absolute) was routing to menagerie.circuitforge.tech/api/v1 which hit the global @api_no_session gate instead of the Magpie API at /magpie/api*. Using import.meta.env.BASE_URL (set to /magpie/ at build time via VITE_BASE_URL) produces /magpie/api/v1 in production and /api/v1 in dev (where Vite proxies /api). Also adds vite-env.d.ts so TypeScript recognises import.meta.env. |
||
|---|---|---|
| .. | ||
| src | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||