coolephp / cors
Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。
Fund package maintenance!
Wechat
Requires
- php: >=7.2
- asm89/stack-cors: ^2.0.3
- guanguans/coole: ^1.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.7
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.2
- overtrue/phplint: ^2.3
- phpunit/phpunit: ^7 || ^8
- vimeo/psalm: ^3.11
README
Adds CORS (Cross-Origin Resource Sharing) headers support in Coole application. - 在 Coole 应用程序中添加 CORS(跨源资源共享)头支持。
Requirement
- PHP >= 7.2
Installation
$ composer require coolephp/cors -vvv
Usage
- 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 ... ], ];
Testing
$ composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.