CORS Middleware for PHP
This middleware handles CORS requests and adds cors headers
This middleware can be installed with composer.
$ composer require los/los-cors
If you are using expressive-skeleton, you can copy
config/autoload/los-cors.global.php and modify configuration as your needs.