nelmio/cors-bundle
Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
2.6.1
104M downloads/mo
#477 most downloaded on Packagist
nelmio/NelmioCorsBundle
What this package is like to depend on
Last release 7 months ago
12 Jan 2026
Ships fairly regularly
a new release about every 8 months
Nearly every release is documented
notes for 28 of 28 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
28 releases · first in 2013
2 releases in the last 12 months
see the full history below
Release timeline
28 releases · Jan 2013 to Jan 2026Releases
latest 28-
2.6.112 Jan 2026Release notes
Open source →What's Changed
- Removed xml configuration by @maxhelias in #206
- Fixed Cache-Attributes not being read first by @dritter in #210
Full Changelog: 2.6.0...2.6.1
-
2.6.023 Oct 2025Release notes
Open source →What's Changed
- Remove default value for allow private network path config by @maciejziemichod in #202
- Fixed symfony 7.4/8.0 support by @gassan in #205
Full Changelog: 2.5.0...2.6.0
-
2.5.024 Jun 2024Release notes
Open source →What's Changed
- Added support for Private Network Access #190
- Fixed default boolean values being overwritten in per-path configs #186
- Fixed deprecation notice in Symfony 7.1 #200
Full Changelog: 2.4.0...2.5.0
-
2.4.030 Nov 2023 -
2.3.116 Feb 2023Release notes
Open source →- Allow psr/log ^2 || ^3 by @michalbundyra in #182
Full Changelog: 2.3.0...2.3.1
-
2.3.015 Feb 2023Release notes
Open source →- Downgraded
CacheableResponseVaryListener's priority from 0 to -10 to ensure it runs after FrameworkExtraBundle listeners have set their cache headers (#179) - Added optional logging support if you inject a Logger into the CorsListener you can get debug info about the whole CORS decision process (#173)
- Added support for setting
expose_headersto a wildcard'*'which exposes all headers, this works as long as allow_credentials is not enabled as per the spec (#132) - Added
skip_same_as_originflag (default to true which is the old behavior) to allow opting out of skipping the CORS headers in the response if the Origin matches the application's hostname (#178) - Fixed ProviderMock having an invalid return type (#169)
- Dropped support for Symfony 4.3 and 5.0 to 5.3
Release notes
Open source →- Downgraded
CacheableResponseVaryListener's priority from 0 to -10 to ensure it runs after FrameworkExtraBundle listeners have set their cache headers (#179)- Added optional logging support if you inject a Logger into the CorsListener you can get debug info about the whole CORS decision process (#173)
- Added support for setting
expose_headersto a wildcard'*'which exposes all headers, this works as long as allow_credentials is not enabled as per the spec (#132) - Added
skip_same_as_originflag (default to true which is the old behavior) to allow opting out of skipping the CORS headers in the response if the Origin matches the application's hostname (#178) - Fixed ProviderMock having an invalid return type (#169)
- Dropped support for Symfony 4.3 and 5.0 to 5.3
- Downgraded
-
2.2.001 Dec 2021 -
2.1.120 Apr 2021Release notes
Open source →- Fixed response for unauthorized headers containing a reflected XSS (#163)
Release notes
Open source →- Fixed response for unauthorized headers containing a reflected XSS (https://github.com/nelmio/NelmioCorsBundle/pull/163)
-
2.1.022 Jul 2020Release notes
Open source →- Added Vary: Origin header to cacheable responses to make sure proxies cache them correctly
Release notes
Open source →- Added
Vary: Originheader to cacheable responses to make sure proxies cache them correctly
-
2.0.115 Nov 2019Release notes
Open source →- Reverted CorsListener priority change as it was interfering with normal operations. The priority is back at 250.
Release notes
Open source →- Reverted CorsListener priority change as it was interfering with normal operations. The priority is back at 250.
-
2.0.012 Nov 2019Release notes
Open source →- BC Break: Downgraded CorsListener priority from 250 to 28, this should not affect anyone but could be a source in case of strange bugs
- BC Break: Removed support for Symfony <4.3
- BC Break: Removed support for PHP <7.1
- Added support for Symfony 5
- Added support for configuration via env vars
- Changed the code to avoid mutating the EventDispatcher at runtime
- Changed the code to avoid returning
Access-Control-Allow-Origin: nullheaders to mark blocked requests
- BC Break: Downgraded CorsListener priority from 250 to 28, this should not affect anyone but could be a source in case of strange bugs
-
1.5.617 Jun 2019Release notes
Open source →- Fixed preflight request handler hijacking regular non-CORS OPTIONS requests.
-
1.5.527 Feb 2019Release notes
Open source →- Compatibility with Symfony 4.1
- Fixed preflight responses to always include
Originin theVaryHTTP header
- Fixed preflight responses to always include
- Compatibility with Symfony 4.1
-
1.5.411 Dec 2017 -
1.5.324 Apr 2017 -
1.5.221 Apr 2017 -
1.5.122 Jan 2017Release notes
Open source →- Fixed
forced_allow_origin_valueto always set the header regardless of CORS, so that requests can properly be cached even if they are not always accessed via CORS
- Fixed
-
1.5.030 Dec 2016Release notes
Open source →- Added an
forced_allow_origin_valueoption to force the value that is returned, in case you cache responses and can not have the allowed origin automatically set to the Origin header- Fixed
Access-Control-Allow-Headersbeing sent even when it was empty - Fixed listener priority down to 250 (This may be BREAKING depending on what you do with your own listeners, but should be fine in most cases, just watch out).
- Fixed
- Added an
-
1.4.109 Dec 2015 -
1.4.013 Jan 2015Release notes
Open source →- Added an
origin_regexoption to allow defining origins based on regular expressions
- Added an
-
1.3.310 Dec 2014Release notes
Open source →- Fixed a security regression in 1.3.2 that allowed GET requests to be executed from any domain
-
1.3.218 Sep 2014Release notes
Open source →- Removed 403 responses on non-OPTIONS requests that have an invalid origin header
-
1.3.121 Jul 2014Release notes
Open source →- Fixed path key normalization to allow dashes in paths
- Fixed HTTP method case folding to support clients that send non-uppercased method names
- Fixed path key normalization to allow dashes in paths
-
1.3.005 Feb 2014 -
1.2.029 Oct 2013Release notes
Open source →- Bumped symfony dependency to 2.1.0+
- Fixed invalid trigger of the CORS check when the Origin header is present on same-host requests
- Fixed fatal error when
allow_methodswas not configured for a given path
- Bumped symfony dependency to 2.1.0+
-
1.1.114 Aug 2013Release notes
Open source →- Fixed issue when
allow_originis set to*andallow_credentialstotrue.
- Fixed issue when
-
1.1.029 Jul 2013 -
1.0.007 Jan 2013