The guard resolved paths against a fixed placeholder origin, so
//same-origin.invalid/api/v1/me passed and fetch sent the CSRF token to
that host. apiFetch now resolves against location.origin, refuses
anything off that origin or outside /api/v1/, and fetches the validated
path-absolute URL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apiFetch now refuses any path that does not resolve to a same-origin URL
under /api/v1/ before attaching X-MealQuest-CSRF or calling fetch, so the
cached CSRF token cannot be sent to another origin or another path.
npm run build runs lint:colors first, so a hex literal outside tokens.css
fails the production build.
Maestro task: f1bb5c9e-ca49-4a3c-b07d-7ed79f0e7fe5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>