Closed noxsii closed 4 years ago
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Description:
CORS Policy: Have the problem that I permanently have the error with Cors. I've made several attempts to fix this. But unfortunately without success. I try to add the Middleware global with:
$app->routeMiddleware([ App\Http\Middleware\Cors::class, ..... ]);
The Middleware:
`namespace App\Http\Middleware; use Closure;
class Cors { protected $settings = array( 'origin' => '*', // Wide Open! 'allowMethods' => 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS', );
}`
I add the Header in the the routes/web,php with:
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE'); header('Access-Control-Allow-Headers: Content-Type, X-Auth-Token, Origin, Authorization');
unfortunately none of the solutions led to success. Someone a solution or a suggestion?
Work with vue.js local :)