PHPackages                             iachilles/cors-behavior - 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. iachilles/cors-behavior

ActiveYii-extension[HTTP &amp; Networking](/categories/http)

iachilles/cors-behavior
=======================

Implementing Cross-origin resource sharing support in your Yii Framework application.

41.3k14PHP

Since Sep 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/iAchilles/cors-behavior)[ Packagist](https://packagist.org/packages/iachilles/cors-behavior)[ RSS](/packages/iachilles-cors-behavior/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

CORS Behavior
=============

[](#cors-behavior)

Implementing Cross-origin resource sharing support in your Yii Framework application.

\####Requirements

- Yii 1.0 or above

\####Installation

- Use Composer or just extract the release file under protected/extensions

\####Configuration

Add the following code to your config file (protected/config/main.php):

```
	'behaviors' => array(
	        array('class' => 'application.extensions.CorsBehavior',
	            'route' => array('controller/actionA', 'controller/actionB', 'controllerC/*'),
	            'allowOrigin' => '*.domain.com'
	            ),
	    ),
```

- **route** list of routes for CORS-requests. If you want to allow CORS-request for any routes, the value of the option must be a string that contains the "\*". To allow CORS-requests for any actions of the specific controller you can also specify "controllerName/\*".
- **allowOrigin** the origin that is allowed to access the resource. A "\*" can be specified to enable access to resource from any origin. A wildcard can be used to specify list of allowed origins, e.g. "\*.yourdomain.com" (sub.yourdomain.com, yourdomain.com, sub.sub.yourdomain.com will be allowed origins in that case)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d0a961fba403ba6057b2428d01dcdefb6dc106809331673629d60155b5d50b7?d=identicon)[iAchilles](/maintainers/iAchilles)

---

Top Contributors

[![iAchilles](https://avatars.githubusercontent.com/u/3855716?v=4)](https://github.com/iAchilles "iAchilles (8 commits)")[![Svechnikov](https://avatars.githubusercontent.com/u/2638864?v=4)](https://github.com/Svechnikov "Svechnikov (1 commits)")

### Embed Badge

![Health badge](/badges/iachilles-cors-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/iachilles-cors-behavior/health.svg)](https://phpackages.com/packages/iachilles-cors-behavior)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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