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

ActiveNeos-package[HTTP &amp; Networking](/categories/http)

flowpack/cors
=============

CORS HTTP component (middleware) for Neos Flow

v2.0.3(10mo ago)522.1k↓56.2%3LGPL-3.0+PHPPHP ^8.1CI failing

Since Jul 17Pushed 7mo ago10 watchersCompare

[ Source](https://github.com/Flowpack/Flowpack.Cors)[ Packagist](https://packagist.org/packages/flowpack/cors)[ RSS](/packages/flowpack-cors/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (6)Dependencies (7)Versions (7)Used By (0)

Flowpack.Cors
=============

[](#flowpackcors)

- [Flowpack.Cors](#flowpackcors)
    - [Introduction](#introduction)
    - [Background](#background)
    - [Installation](#installation)
    - [Configuration](#configuration)
        - [Enable CORS in Production:](#enable-cors-in-production)
        - [Add additional allowed headers (e.g. `Authorization`):](#add-additional-allowed-headers-eg-authorization)
        - [Configuration reference](#configuration-reference)

Introduction
------------

[](#introduction)

Fully featured CORS HTTP component (a.k.a. middleware) for Flow framework to allow "cross-domain" requests.

Background
----------

[](#background)

This package is a implementation of a CORS middleware for Cross-Origin Resource Sharing ( see ). This enables the client (browser) of a webapp to perform "cross-domain" requests.

The work is partially based on the awesome [github.com/rs/cors](https://github.com/rs/cors) HTTP middleware for the Go programming language.

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

[](#installation)

```
composer require flowpack/cors

```

(Refer to the [composer documentation](https://getcomposer.org/doc/) for more details)

The default settings enables CORS for all origins (`*`) in the Flow Development context. This is usually not what you want in a production environment.

Configuration
-------------

[](#configuration)

In your package or global `Settings.yaml` ( see [Flow framework Configuration](http://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/Configuration.html)).

### Enable CORS in Production:

[](#enable-cors-in-production)

```
Flowpack:
  Cors:

    enabled: true

    allowedOrigins:
      - 'trusted-domain.tld'

```

### Add additional allowed headers (e.g. `Authorization`):

[](#add-additional-allowed-headers-eg-authorization)

```
Flowpack:
  Cors:

    allowedHeaders:
      # defaults
      - 'Origin'
      - 'Accept'
      - 'Content-Type'
      # additional headers
      - 'Authorization'

```

Note: Make sure to set *all* array values including the defaults (if you want to keep them) in the configuration because the Flow configuration is merged with numeric keys which can lead to unwanted effects.

### Configuration reference

[](#configuration-reference)

```
Flowpack:
  Cors:

    enabled: false

    # A list of origins a cross-domain request can be executed from
    # If the special * value is present in the list, all origins will be allowed.
    # An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com).
    # Only one wildcard can be used per origin.
    #
    allowedOrigins:
      - '*'

    # A list of methods the client is allowed to use with cross-domain requests.
    #
    allowedMethods:
      - 'GET'
      - 'POST'

    # A list of non simple headers the client is allowed to use with cross-domain requests.
    #
    allowedHeaders:
      - 'Origin'
      - 'Accept'
      - 'Content-Type'

    # Indicates which headers are safe to expose to the API of a CORS API specification
    #
    exposedHeaders: []

    # Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates.
    #
    allowCredentials: false

    # Indicates how long (in seconds) the results of a preflight request can be cached. The default is 0 which stands for no max age.
    #
    maxAge: 0

```

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance60

Regular maintenance activity

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity76

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 ~584 days

Recently: every ~356 days

Total

6

Last Release

328d ago

Major Versions

v1.0.0-alpha2 → 2.0.02024-10-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/790179df9a15d9175b9ec8fdc2df5c4c660a52a4fb6d429376cf66b66b0a595c?d=identicon)[chlu](/maintainers/chlu)

---

Top Contributors

[![mficzel](https://avatars.githubusercontent.com/u/1309380?v=4)](https://github.com/mficzel "mficzel (5 commits)")[![markusguenther](https://avatars.githubusercontent.com/u/1014126?v=4)](https://github.com/markusguenther "markusguenther (3 commits)")[![t-heuser](https://avatars.githubusercontent.com/u/53174153?v=4)](https://github.com/t-heuser "t-heuser (2 commits)")[![hlubek](https://avatars.githubusercontent.com/u/33351?v=4)](https://github.com/hlubek "hlubek (1 commits)")

---

Tags

corscross-originflowneosneoscms

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[illuminate/http

The Illuminate Http package.

13137.2M6.4k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

1131.0M734](/packages/neos-neos)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M82](/packages/mezzio-mezzio-router)[neos/media

The Media package

101.2M49](/packages/neos-media)

PHPackages © 2026

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