jeremykenedy/laravel-spa

CORS error

sayedahmadnawid opened this issue · 2 comments

When I access the localhost:8000, the following error appears. I am new with Vite. Could you please explain a little bit in details. thank you.

Access to XMLHttpRequest at 'http://localhost/sanctum/csrf-cookie' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Your configuration has an issue most likely in the Env of the app irl not matching. I cannot replicate.