Problems with the Cors in Laravel and Angular


I am trying to send the information from AngularJ to my apirest of L5 the information is from the Login e users with your password the error is as follows.

I have tried for minutes to apply several L5 packages in relation to this error and nothing that has given me results. The version of L5 is 5.1

asked by vdjkelly 08.09.2016 в 20:04

1 answer


You have to modify the configuration on your server so you can accept requests from a different domain.

For security reasons, browsers restrict cross-origin HTTP requests initiated within a script. I recommend using the package CORS laravel .

Also, be sure to disable the CSRF token verification (remove 'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken' in app/Http/Kernel.php ).

answered by 16.09.2016 / 05:15