Laravel Cors blocking requirements axios

0

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?

    
asked by anonymous 23.02.2018 / 00:10

1 answer

0

CORS failed to register as a middleware for api.

    
16.10.2018 / 13:52