The setting for my laravel cors is this one.
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,
'hosts' => [],
The configuration of my request axios is
axios.get('http://api2u.oo/api/rede/1', {
headers: {
'Access-Control-Allow-Origin': '*',
},
crossdomain: true
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
Laravel 5.5. *
The error
How to solve?