pierrejeambrun opened a new pull request, #71778: URL: https://github.com/apache/airflow/pull/71778
Extends the API's CORS configuration with an optional `access_control_allow_origin_regex` option, matched against the request `Origin`. It's aimed at deployments whose API clients run on dynamic hostnames — per-branch preview environments, ephemeral subdomains — where the exact origins can't be enumerated ahead of time and the wildcard is rejected (Airflow's API requires credentialed CORS). FastAPI's `CORSMiddleware` already supports `allow_origin_regex` and echoes the matched origin back rather than `*`, so it stays compatible with the credentialed responses the API needs. On a match the exact origin is returned; a regex-only configuration now enables CORS as well. closes: #52155 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
