Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nelmio/NelmioCorsBundle
Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
https://github.com/nelmio/NelmioCorsBundle
bundle cors cors-request cross-origin-resource-sharing php symfony symfony-bundle
Last synced: 18 days ago
JSON representation
Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
- Host: GitHub
- URL: https://github.com/nelmio/NelmioCorsBundle
- Owner: nelmio
- License: mit
- Created: 2011-11-04T10:38:47.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-06-28T13:05:22.000Z (5 months ago)
- Last Synced: 2024-10-19T18:11:43.187Z (24 days ago)
- Topics: bundle, cors, cors-request, cross-origin-resource-sharing, php, symfony, symfony-bundle
- Language: PHP
- Homepage: https://symfony.com/bundles/NelmioCorsBundle/
- Size: 204 KB
- Stars: 1,891
- Watchers: 17
- Forks: 108
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# NelmioCorsBundle
## About
The NelmioCorsBundle allows you to send [Cross-Origin Resource Sharing](http://enable-cors.org/)
headers with ACL-style per-URL configuration.## Features
* Handles CORS preflight OPTIONS requests
* Adds CORS headers to your responses
* Configured at the PHP/application level. This is convenient but it also means
that any request serving static files and not going through Symfony will not
have the CORS headers added, so if you need to serve CORS for static files you
probably should rather configure these headers in your web server## Installation
Require the `nelmio/cors-bundle` package in your composer.json and update your dependencies:
```bash
composer require nelmio/cors-bundle
```The bundle should be automatically enabled by [Symfony Flex][1]. If you don't use
Flex, you'll need to enable it manually as explained [in the docs][2].## Usage
See [the documentation][2] for usage instructions.
## License
Released under the MIT License, see LICENSE.
[1]: https://symfony.com/doc/current/setup/flex.html
[2]: https://symfony.com/bundles/NelmioCorsBundle/current/index.html