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>