PHPackages                             cspray/labrador-http-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. cspray/labrador-http-cors

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

cspray/labrador-http-cors
=========================

An Amp http-server middleware library to facilitate CORS

1.0.0(2y ago)1011.2k7[1 issues](https://github.com/labrador-kennel/http-cors/issues)1PHPPHP &gt;= 8.1

Since Feb 9Pushed 2y ago2 watchersCompare

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

READMEChangelog (6)Dependencies (4)Versions (7)Used By (1)

Labrador HTTP CORS
==================

[](#labrador-http-cors)

[![GitHub release](https://camo.githubusercontent.com/cdd6ad4c5f84762c1a3070a05967ba4ad3750e111b0667ed8d4133a2a2aee4e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c61627261646f722d6b656e6e656c2f687474702d636f72732e7376673f7374796c653d666c61742d737175617265)](https://github.com/labrador-kennel/http-cors/releases/latest)[![GitHub license](https://camo.githubusercontent.com/69c2792c901ac8bf413800e249f6a85c963f039eaedffd746e416ea4cf6f6c69/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c61627261646f722d6b656e6e656c2f687474702d636f72732e7376673f7374796c653d666c61742d737175617265)](http://opensource.org/licenses/MIT)

A PHP 8+ library intended to provide spec-compliant CORS middleware for projects running on [Amp's http-server](https://amphp.org/http-server/). Though this library lives under the Labrador namespace it has only one dependency, `amphp/http-server`, and does not depend on any other Labrador packages.

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

[](#installation)

[Composer](https://getcomposer.org) is the only supported method for installing Labrador packages.

```
composer require cspray/labrador-http-cors

```

Example
-------

[](#example)

Below is an example using the fluent API. Please check out the documentation for more details and examples of non-fluent usage.

```
