CORS using Laravel and Axios

Posted 2 months ago by ottz0

I'm using Laravel and Axios but am getting CORS issues. I'm going around in circles and getting very confused, so if someone can help me that would be great

I can get responses from certain endpoints which is fine, but other endpoints i'm getting this

from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

I have windows.axios in the bootstrap.js enabled and I also have the csrf_token meta in the head. I have also tried the \Barryvdh\Cors\HandleCors::class, enabled in the Kernel.php, so I don't understand why I get the above error

Please sign in or create an account to participate in this conversation.