aimeos jsonapi request blocked by CORS policy

186 Views Asked by At

On local development I am facing following error on ajax request:

Access to XMLHttpRequest at 'http://pmb.local/jsonapi/product' from origin 'http://localhost:3000' 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.

1

There are 1 best solutions below

0
Hassan Ali Shahzad On BEST ANSWER

Need to the following change this this file enter image description here

Ddont forget to run:

php artisan optimize