Before Laravel 9 when I have error:
Access to XMLHttpRequest at 'http://localhost:8000/demo' from origin 'null'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is
present on the requested resource.
I must install fruitcake/laravel-cors ( https://www.positronx.io/how-to-enable-cors-in-laravel/ ).
In Laravel 9 I found information:
"Integrate Laravel CORS into framework Dries Vints migrated the fruitcake/laravel-cors package into the Laravel framework: The main reason is that we want to remove a circular dependency we rely on additionally to the fact that we eliminate another dependency of the skeleton. All credits for the code go to @barryvdh of @fruitcake . Thanks for maintaining that package for so long!".
How can I make cors for example for url: api/list and api/profiles in new Laravel?