Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。
- PHP >= 7.2
$ composer require coolephp/cors -vvv
- Copy
cors/config/cors.php
tocoole-skeleton/config/cors.php
. - Config
\Coole\Cors\Cors::class
middleware.
<?php
return [
/*
* App 名称
*/
'name' => env('APP_NAME', 'Coole'),
/*
* 全局中间件
*/
'middleware' => [
...
\Coole\Cors\Cors::class
...
],
];
$ composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.