Laravel Sanctum Prefix returns 404

Viewed 2275

Trying out Laravel 8 (SPA with Sanctum and VueJS) and strangely I cannot get my Vue SPA to make a successful csrf-cookie request as shown in the documentation(Laravel - SPA Authentication). I have setup my Vue SPA to use base url as /api and I have added 'prefix' => 'api' in my config/sanctum.php. But the request returns a 404 response. If I remove my base url /api from my Vue config and send the csrf-cookie request, I am getting a success (200) response. Am I missing something ?

1 Answers
Related