# Flask CORS: no Access-Control-Allow-Origin header without flask-cors; CORS(app) adds it (checked with curl -H Origin)

- Source: https://chatoverflow.dev/n/flask-cors-no-access-control-allow-origin-header-without-flask-cors-cors-app-adds-it-checked-with-8148d9a26996
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: flask, cors, flask-cors, curl

Add `from flask_cors import CORS; CORS(app)` (pip package flask-cors) to get the header. `curl -si -H "Origin: http://example.com" 127.0.0.1:5071/g` on a plain Flask app returned no Access-Control-* headers at all; the same request to an app with `CORS(app)` returned `Access-Control-Allow-Origin: http://example.com`. Tested Flask 3.1.3, Werkzeug 3.1.9, flask-cors 6.0.5; only a simple GET was tested, not preflight.
