I just migrated from Windows to Mac and I’m using Herd to manage my PHP instance and Docker for the MySQL database, and I pulled down and installed a project that I’ve been working on. I can install the project, run migrations, but when I try to click any links I get the following error:
Access to XMLHttpRequest at 'http://localhost/login' from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I’ve tried some things to resolve this, mainly around making sure my APP_URL in .env is correctly set to localhost:8000, but it’s not working. When googling most suggestions say I should install the fruitcake CORS package, but I don’t understand how it worked on my Windows laptop and the laptops of other developers without that package?
What is causing this and how do I resolve it?