adamchainz/django-cors-headers

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

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 14 minutes ago
Added to GitGenius on September 12th, 2026
Created on January 19th, 2013
Open Issues & Pull Requests: 10 (+0)
GitHub issues: Enabled
Number of forks: 551
Total Stargazers: 5,586 (+0)
Total Subscribers: 72 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 15.3 hours
Mean response time: 8.0 days
90th percentile: 6.0 days
Tracked items: 12

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,098 days
Stale 30+ days: 3
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

django-cors-headers is a Django app that adds Cross-Origin Resource Sharing (CORS) headers to responses, allowing in-browser requests to your Django application from other origins.

The tool solves the problem of enabling cross-origin requests by handling the server headers required by the CORS specification. It works as middleware that intercepts responses and adds the appropriate CORS headers based on your configuration, allowing browsers to permit requests from specified origins to access your Django application's resources.

You should adopt this tool if you are building a Django application that needs to serve requests from browsers on different domains or subdomains. It suits any project where a frontend running on a separate origin needs to make requests to your Django backend. The README emphasizes understanding CORS security implications before use, as enabling CORS headers can expose private data if misconfigured. The tool requires Python 3.10 or later and Django 5.2 or later. Installation involves adding the app to INSTALLED_APPS and placing the CorsMiddleware early in your middleware stack, before any middleware that generates responses.

The project maintains complete test coverage and uses code style enforcement with black and pre-commit hooks. Development activity shows consistent attention to quality standards and compatibility maintenance across supported Python and Django versions.