Home > Blockchain >  Laravel api blocks all requests with CORS
Laravel api blocks all requests with CORS

Time:09-13

I have a problem with all my requests sent in javascript on the api. They are all blocked by the CORS. When they are sent from postman, they work fine.

The fruitcake/laravel-cors library is already installed but has not fixed the problem.

Do you have any solutions? Thank you in advance.

CodePudding user response:

Remove this fruitcake/laravel-cors package .Now Laravel 9 by default provides cors solution.

Visit site from http://localhost:8000 not http://127.0.0.1:8000

CodePudding user response:

I am on laravel 8, and access to the api does not work in production. Everything was working normally and since reinstalling the vps (on apache) it doesn't work anymore. I don't know if it's apache or laravel.

  • Related