# nelmio/NelmioCorsBundle

Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application

Repository: https://github.com/nelmio/NelmioCorsBundle
Canonical: https://ross.abutalabs.com/products/nelmiocorsbundle
Homepage: https://symfony.com/bundles/NelmioCorsBundle/
Language: PHP
License: MIT
License Family: permissive
Topics: php, symfony, bundle, symfony-bundle, cors-request, cors, cross-origin-resource-sharing
Last push: 2026-01-14T20:01:33+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 62, release rhythm 54, longevity 100
- inputs: {"age_days": 5416, "days_push": 231, "days_rel": 231, "gap_med": 83, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1925, forks 103 (observed 2026-08-28T04:05:55.516057+00:00)

## What it is
A Symfony bundle that adds Cross-Origin Resource Sharing (CORS) headers to responses with ACL-style per-URL configuration. It handles CORS preflight OPTIONS requests and is configured at the application level in PHP/YAML.

## Use cases
- enable CORS for a Symfony API
- handle CORS preflight OPTIONS requests in PHP
- configure allowed origins per URL path
- fix cross-origin browser requests to my backend
- allow custom headers and methods for cross-origin calls
- add CORS headers without touching web server config

## When to choose
- you run a Symfony application and need CORS for API endpoints
- you want per-URL, ACL-style CORS configuration in application code
- you need preflight request handling with cache control

## When to avoid
- you need CORS headers on static files not served through Symfony
- you don't use Symfony or PHP
- a reverse proxy or web server already manages CORS headers

## Facets
- artifact type: plugin
- maturity: stable
- function: middleware, http-server, security, routing
- domain: web-development, backend, apis, security
- platform: php, self-hosted
- tags: cors, symfony-bundle, cross-origin-resource-sharing, preflight-requests, http-headers, web-server

## Member repositories
- nelmio/NelmioCorsBundle (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:55.516057+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:09:22.196424+00:00, confidence not recorded.
  - readme: https://github.com/nelmio/NelmioCorsBundle (fetched 2026-08-28T04:05:55.516057+00:00, sha e49ef69c2458)
  - homepage: https://symfony.com/bundles/NelmioCorsBundle/ (fetched 2026-08-29T10:48:48.245422+00:00, sha 20e669a067bb)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T10:48:48.250979+00:00, sha 5bd749e2b676)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T10:48:48.249162+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T10:48:48.253097+00:00, sha 5928e60cd226)
- Data as of 2026-08-30T08:39:29.467469+00:00.
