CORS error
sayedahmadnawid opened this issue · 2 comments
sayedahmadnawid commented
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.
jeremykenedy commented
Your configuration has an issue most likely in the Env of the app irl not matching. I cannot replicate.
jeremykenedy commented
It picks it up automatically from here
https://github.com/jeremykenedy/laravel-spa/blob/released/config/sanctum.php#L18