Register the CatchAllOptionsRequestsProvider
service provider in bootstrap/app.php
which will check the incoming request and response successfully if it is an OPTIONS
request.
Add the CorsMiddleware
to the $app->middleware([
array in bootstrap/app.php
which will attach the following CORS headers to all responses:
- allow all headers
- allow requests from all origins
- allow all the headers which were provided in the request
Cors middleware is working but catchalloptionsprovider is not working and throwing the following error..Somebody,
![screen shot 2017-11-05 at 12 53 59 am](https://user-images.githubusercontent.com/18374743/32408741-227e4096-c1c4-11e7-8081-1d36550245d8.png)
please help me!!