PHPackages                             ayteam/aycors - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. ayteam/aycors

ActiveLibrary[HTTP &amp; Networking](/categories/http)

ayteam/aycors
=============

thinkphp5 for cors

1.1(8y ago)128MITPHPPHP &gt;=5.4.0

Since Aug 8Pushed 8y agoCompare

[ Source](https://github.com/ayteam/aycors)[ Packagist](https://packagist.org/packages/ayteam/aycors)[ Docs](https://github.com/ayteam/aycors)[ RSS](/packages/ayteam-aycors/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

aycors
======

[](#aycors)

thinkphp5 for cors

安装方法
----

[](#安装方法)

### 第一步 使用composer下载SDK

[](#第一步-使用composer下载sdk)

```
composer require ayteam/aycors
```

### 第二步 项目根目录执行

[](#第二步-项目根目录执行)

```
php think cors:config
```

> 查看application/extra/cors.php这个文件是否存在， 如果不存在复制一份 [config.php](https://github.com/ayteam/aycors/blob/master/src/config.php)到 application/extra

使用方法
----

[](#使用方法)

参考阅读 [跨域资源共享 CORS 详解](http://www.ruanyifeng.com/blog/2016/04/cors.html)

```
return Cors::json(['code'=>1]); // 替代 return json(['code'=>1]);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3201d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d7cdc067f5be43f1dcd659d7b5b6e427523617bf88a3ad18dc9827c474397b0?d=identicon)[anyuan](/maintainers/anyuan)

---

Top Contributors

[![lucasgoog](https://avatars.githubusercontent.com/u/29162384?v=4)](https://github.com/lucasgoog "lucasgoog (20 commits)")

---

Tags

corsCross-Origin Resource Sharingthinkphp5

### Embed Badge

![Health badge](/badges/ayteam-aycors/health.svg)

```
[![Health](https://phpackages.com/badges/ayteam-aycors/health.svg)](https://phpackages.com/packages/ayteam-aycors)
```

###  Alternatives

[asm89/stack-cors

Cross-origin resource sharing library and stack middleware

1.3k180.6M24](/packages/asm89-stack-cors)[fruitcake/php-cors

Cross-origin resource sharing library for the Symfony HttpFoundation

311242.1M35](/packages/fruitcake-php-cors)[neomerx/cors-psr7

Framework agnostic (PSR-7) CORS implementation (www.w3.org/TR/cors/)

682.4M19](/packages/neomerx-cors-psr7)[tuupola/cors-middleware

PSR-7 and PSR-15 CORS middleware

1331.8M24](/packages/tuupola-cors-middleware)[neomerx/cors-illuminate

CORS (Cross-Origin Resource Sharing) support for Laravel and Lumen

4996.4k2](/packages/neomerx-cors-illuminate)[jdesrosiers/silex-cors-provider

A silex service provider that adds CORS services to silex

83892.3k10](/packages/jdesrosiers-silex-cors-provider)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
