- 授权协议: MIT
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/medz/cors
- 软件文档: https://github.com/medz/cors/blob/master/README.md
- 官方下载: https://github.com/medz/cors/releases
软件介绍
CORS
这是一个 PHP 跨域资源共享 (CORS Cross-origin resource sharing) 中间件。
支持
Array, 原生 PHP 代码
使用 PSR-7
Laravel
Symfony
使用
composer require medz/cors
示例
use Medz\Cors\Cors; $cors = new Cors($config); // The $config -> `config/cors.php` file. $cors->setRequest($requestType, $request); // The $request is empty array or is `NULL` or $_REQUEST $cors->setResponse($responseType, $response); // The $response is empty array. $cors->handle(); $response = $cors->getResponse();
$requestType 和 $responseType 都是单独设置支持的类型,但如果在框架中使用,这两个值通常是相同的。因为你可以单独设置它,所以你可以根据自己的需要提供不同的值以实现你的目标。
Learn Python 3 the Hard Way
Zed A. Shaw / Addison / 2017-7-7 / USD 30.74
You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring t......一起来看看 《Learn Python 3 the Hard Way》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
RGB转16进制工具
RGB HEX 互转工具
