[Vuejs]-Making a call to API redirects me to Home with 302 status code

1👍

I have solved this problem by uncommenting this middleware in app/Http/Kernel.php

\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,

according to https://laravel.com/docs/10.x/sanctum#sanctum-middleware

Leave a comment