I get this error:
Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/user' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:8080/*' that is not equal to the supplied origin.
I have create Middleware and nothing changed:
public function handle($request, Closure $next)
{
return $next($request)
->header('Access-Control-Allow-Origin','http://localhost:8080/*')
->header('Access-Control-Allow-Methods','POST,PUT,GET,DELETE,OPTIONS')
->header('Access-Control-Allow-Headers','Accept,Authorization,Content-Type')
->header('Content-Type','application/json');
}