Skip to content

Add optional support for CORS allow_origin_regex #52155

Closed

Description

@zach-overflow

Description

I'm mainly writing this as an issue to check if there are any security concerns or objections to this feature. If not, I'm happy to put together a PR for this.

Currently, Airflow's access_control_allow_origins option can only specify a wildcard (*) or a list of origins with the exact protocol-host-port values (e.g. http://localhost:1234,https://localhost443. Ideally, Airflow's api config could also support a regex pattern for the allowed origins.

Use case/motivation

Since the various Airflow API access_control_allow_* config options are fed directly into FastAPIs CORSMiddleware, and since that middleware class has an optional allow_origin_regex argument, it seems natural to extend Airflow's CORS config options to support that field as well. This could prove particularly useful for Airflow deployments which may interact with frontend components operating with dynamic hostnames, as just one example.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added a commit that references this issue on Aug 19, 2026
    1a0eebc
  2. added 2 commits that reference this issue on Sep 7, 2026
    b3bcf9f
    c25fb08
  3. added a commit that references this issue on Sep 11, 2026
    8293f6d
  4. added a commit that references this issue on Sep 27, 2026
    553cbf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:APIAirflow's REST/HTTP APIkind:featureFeature Requestsneeds-triagelabel for new issues that we didn't triage yet

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions