# adamchainz/django-cors-headers

Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

Repository: https://github.com/adamchainz/django-cors-headers
Canonical: https://ross.abutalabs.com/products/django-cors-headers
Language: Python
License: MIT
License Family: permissive
Topics: django, cors
Last push: 2026-08-18T20:32:38+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 4974, "days_push": 15, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5587, forks 552 (observed 2026-08-28T04:09:22.640500+00:00)

## What it is
A Django app that adds Cross-Origin Resource Sharing (CORS) headers to HTTP responses via middleware. It allows in-browser requests to a Django application from other origins with configurable allowed origins, methods, and headers.

## Use cases
- enable CORS for a Django REST API consumed by a separate frontend
- allow browser requests to Django from another domain
- configure allowed CORS origins and headers in Django
- fix cross-origin request blocked errors in a Django app
- serve a React or Vue frontend from a different origin than Django

## When to choose
- you run a Django backend that browsers on other origins need to call
- you want a mature, well-maintained, configurable CORS solution for Django

## When to avoid
- your project does not use Django
- you need CORS handling at a proxy or gateway level rather than in the app

## Facets
- artifact type: library
- maturity: stable
- function: middleware, http-server, security
- domain: web-development, backend, apis, security
- platform: python
- tags: django, cors, cross-origin, http-headers, rest-api, web-server

## Member repositories
- adamchainz/django-cors-headers (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.640500+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-29T17:55:31.955047+00:00, confidence not recorded.
  - readme: https://github.com/adamchainz/django-cors-headers (fetched 2026-08-28T04:09:22.640500+00:00, sha 71cc7ea65c6f)
  - registry_pypi: https://pypi.org/pypi/django-cors-headers/json (fetched 2026-08-29T08:50:27.808821+00:00, sha a87c5e350e75)
- Data as of 2026-08-30T08:39:29.467469+00:00.
