Closed gotoin closed 6 years ago
response headers Access-Control-Allow-Origin:
response headers Access-Control-Allow-Origin: *
// config/api.php 'middleware' => [ \Barryvdh\Cors\HandleCors::class, ],
// Kernel.php 'api' => [ 'throttle:60,1', 'bindings', \Barryvdh\Cors\HandleCors::class, ],
first delete laravel-cors
// add it to config/api.php header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Headers:*'); header('Access-Control-Allow-Methods:*'); header('Access-Control-Allow-Credentials:false'); header('withCredentials:false');
But this is not an elegant solution.
thanks.
Tested with Fresh Laravel Installation(Laravel5.5+Dingo2.0), CORS working. Are you published config/cors.php ?
config/cors.php
I use the laravel-cors package. and that problem with this package.
thank you.
@erayaydin
Actual Behaviour
Expected Behaviour
Steps to Reproduce
Possible Solutions
first delete laravel-cors
But this is not an elegant solution.
thanks.