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

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

keboola/cors
============

Minimalistic CORS handlers for Symfony apps

0.4.0(2y ago)018.2k↓18.8%MITPHPPHP ^8.2

Since Mar 9Pushed 2y ago15 watchersCompare

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

READMEChangelog (7)Dependencies (9)Versions (8)Used By (0)

Minimalistic CORS library [![Build Status](https://camo.githubusercontent.com/0291fcaaa24154c50c6fca7b23b4cc1fe8e21d01328c41a35a7ad864e5df7407/68747470733a2f2f6465762e617a7572652e636f6d2f6b65626f6f6c612d6465762f636f72732f5f617069732f6275696c642f7374617475732f6b65626f6f6c612e636f72733f6272616e63684e616d653d6d61696e)](https://dev.azure.com/keboola-dev/cors/_build/latest?definitionId=67&branchName=main)
===================================================================================================================================================================================================================================================================================================================================================================================================================

[](#minimalistic-cors-library-)

Adds CORS headers and OPTIONS response to all API endpoints

Usage
-----

[](#usage)

```
composer require keboola/cors
```

Add this to the `services.yaml` file:

```
    Keboola\Cors\CorsListener:
        arguments:
            -
        tags:
            - { name: kernel.event_listener, event: kernel.request }
            - { name: kernel.event_listener, event: kernel.response }

    Keboola\Cors\ResponseHeadersListener:
        tags:
            - { name: kernel.event_listener, event: kernel.response }
```

Development
-----------

[](#development)

Run the tests:

```
docker-compose build
docker-compose run tests
```

To run tests with local code use:

```
docker-compose run tests-local composer install
docker-compose run tests-local
```

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~179 days

Recently: every ~171 days

Total

7

Last Release

818d ago

PHP version history (3 changes)0.0.1PHP ^7.4

0.1.0PHP ^7.4|^8.0

0.4.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![odinuv](https://avatars.githubusercontent.com/u/4319320?v=4)](https://github.com/odinuv "odinuv (13 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (9 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (4 commits)")[![ujovlado](https://avatars.githubusercontent.com/u/419849?v=4)](https://github.com/ujovlado "ujovlado (2 commits)")

---

Tags

optionscorskeboola

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M236](/packages/api-platform-core)[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

314242.1M35](/packages/fruitcake-php-cors)[friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

43813.2M47](/packages/friendsofsymfony-http-cache-bundle)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)

PHPackages © 2026

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