PHPackages                             jarir-ahmed/yii-cors-bypass - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jarir-ahmed/yii-cors-bypass

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jarir-ahmed/yii-cors-bypass
===========================

A package to replace the index.php file in a Yii application to bypass CORS policy for React and Vue.js

1.0.0.0(1y ago)07MITPHPPHP &gt;=7.2

Since Oct 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jarir2020/jarir-ahmed-yii-cors-bypass)[ Packagist](https://packagist.org/packages/jarir-ahmed/yii-cors-bypass)[ RSS](/packages/jarir-ahmed-yii-cors-bypass/feed)WikiDiscussions main Synced 1mo ago

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

Yii CORS Bypass
===============

[](#yii-cors-bypass)

This package replaces the default `web/index.php` file of a Yii2 application with a version that includes CORS headers. It allows you to work seamlessly with React or Vue.js frontends.

Useage
------

[](#useage)

\[ use JarirAhmed\\CorsBypass\\Replacer; public function actionReplaceIndex() { // Create an instance of the Replacer class $replacer = new Replacer();

```
try {
    // Replace the index.php file
    $replacer->replaceIndexFile();

    return $this->asJson(['message' => 'index.php replaced successfully']);
} catch (\Exception $e) {
    return $this->asJson(['error' => 'Failed to replace index.php: ' . $e->getMessage()]);
}

```

} \]

Installation
------------

[](#installation)

Run the following command to install the package via Composer:

```
composer require jarir-ahmed/yii-cors-bypass

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/20700f34ff813055154e843bbdbe04d33320c1e6a81bbb3301cad67cb8350fd3?d=identicon)[jarircse16](/maintainers/jarircse16)

---

Top Contributors

[![jarir2020](https://avatars.githubusercontent.com/u/175597633?v=4)](https://github.com/jarir2020 "jarir2020 (5 commits)")

### Embed Badge

![Health badge](/badges/jarir-ahmed-yii-cors-bypass/health.svg)

```
[![Health](https://phpackages.com/badges/jarir-ahmed-yii-cors-bypass/health.svg)](https://phpackages.com/packages/jarir-ahmed-yii-cors-bypass)
```

PHPackages © 2026

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