Vishnu05 opened a new issue #18110:
URL: https://github.com/apache/airflow/issues/18110


   ### Apache Airflow version
   
   2.0.0
   
   ### Operating System
   
    Ubuntu 18.04.5 LTS 
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   CORS origin could not be enabled with airflow.cfg. We tried to trigger DAGs 
from Angular UI
   Angular version: 12+ 
   Node.js version: 16+
   
   Access to XMLHttpRequest at 'http://airflow.com/api/v1/dags/Samples/dagRuns' 
from origin 'http://angularui.com:4200' has been blocked by CORS policy: 
Response to preflight request doesn't pass access control check: No 
'Access-Control-Allow-Origin' header is present on the requested resource.
   
   example: 
   [API]
   access_control_allow_headers = *
   access_control_allow_methods = *
   access_control_allow_origin = *
   
   We tried following the docs, we restarted the server always. None of them 
work.
   
   
   
   
   
   ### What you expected to happen
   
   We expected to call an Airflow API and trigger DAGs from angular UI. But 
CORS issue blocked call to the Airflow API.
   
   ### How to reproduce
   
   1. Create a new angular project.
   2. Create a button to make an Airflow API call using HttpClient.
   3. Run it in production mode.
   4. Click the button to trigger the API call.
   5. Check chrome console.
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]


Reply via email to