phpnexus/cors
最新稳定版本:0.3.6
Composer 安装命令:
composer require phpnexus/cors
包简介
Provides a reusable framework-agnostic CORS class.
关键字:
README 文档
README
Provides a lightweight, extensible, framework-agnostic CORS class.
You probably want to check these specific implementations for easy installation
Installation
It's recommended that you use Composer to install Cors:
$ composer require phpnexus/cors
This package requires PHP 8.1.
Usage
TODO
Configuration
Allow-Methods
Default: []
An array of allowed HTTP methods. These names are case-sensitive.
Example: ['GET', 'POST']
Allow-Headers
Default: []
Example: ['Content-Type']
Allow-Origins
Default: []
An array of allowed origins, in the form scheme://hostname.
Example: ['http://example.com', 'https://example.com']
This is not a replacement for proper access control measures.
Note: An asterisk (*) can also be used to allow any origin, but as per the specification the asterisk (*) cannot be used when Allow-Credentials is true.
Allow-Credentials
Default: false
Use true to allow cookies to be sent with the request.
Note: Cannot be true when the Allow-Origin contains "*".
Expose-Headers
Default: []
Max-Age
Default: 0 (no cache)
Number of seconds to cache the preflight response.
Roadmap
- Benchmarks
Versioning
The packages adheres to the SemVer specification, and there will be full backward compatibility between minor versions.
Contributing
Please see CONTRIBUTING for details.
License
This package is released under the Apache 2.0 License. See the bundled LICENSE file for details.
统计信息
- 总下载量: 616
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 2
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2016-05-03