-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS access_control_allow_origin header never returned #20110
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
@ryanahamilton I know you were using and depending on CORS -- any ideas here? |
Looks like the logic does not handle wildcard expansion: airflow/airflow/www/extensions/init_views.py Lines 167 to 171 in b0eecc3
|
Was anybody able to fix a fix to the CORS issue for airflow API? |
Feel free to fix it, pull requests are open to anyone 🙂 |
Has this been fixed I'm having this problem on 2.3.3 and 2.3.4 docker compose |
Apache Airflow version
2.2.2 (latest released)
What happened
To fix CORS problem added the access_control_allow_headers, access_control_allow_methods, access_control_allow_origins variables to the 2.2.2 docker-compose file provided in documentation. Both header, and methods returns with the correct value, but origins never does.
What you expected to happen
The CORS response returning with provided origin header value.
How to reproduce
Download the latest docker-compose from documentation add the following lines:
AIRFLOW__API__ACCESS_CONTROL_ALLOW_HEADERS: 'content-type, origin, authorization, accept'
AIRFLOW__API__ACCESS_CONTROL_ALLOW_METHODS: 'GET, POST, OPTIONS, DELETE'
AIRFLOW__API__ACCESS_CONTROL_ALLOW_ORIGINS: '*'
run and call with a CORS preflight
Operating System
Windows 11
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else
It's repeatable regardless of ORIGINS value. There was a name change on this variable that's possibly not handled.
On 2.1.4 the same works without problems.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: