[ 
https://issues.apache.org/jira/browse/AIRFLOW-4804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16871211#comment-16871211
 ] 

Srinivasa kalyan Sozhavaram commented on AIRFLOW-4804:
------------------------------------------------------

Thanks, [~kamil.bregula].

 

However, We don't want to provide the Airflow front end to the business users. 
The portal we have created will be calling the APIs in the background to call 
few standalone DAGs which will accept the variables sent as part of the API 
calls. This is to let user with minimal technical knowledge be able to run the 
processes with a click of a button without further indulging themselves with 
schedules, logs and so on. Portal was built on local machine and we wanted to 
test the API calls to Airflow where we have witnessed this error.

 

We did overcome this error but the question was to see if it helps to have CORS 
being enabled by few steps in the configuration. 

> Enable CORS (Cross-Origin Request Sharing) for the API
> ------------------------------------------------------
>
>                 Key: AIRFLOW-4804
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4804
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: api
>    Affects Versions: 1.10.3
>            Reporter: Srinivasa kalyan Sozhavaram
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Ability needed to call the Airflow API that are hosted in a server with SSL 
> enabled. We get an error when the API is being integrated to a custom-built 
> portal on HTTP:
>  
> {quote} *Access to XMLHttpRequest at 
> 'https://<airflow_DNS>/api/experimental/dags/<dag_id>/dag_runs' from origin 
> 'http://localhost: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.*
> {quote}
>  
> Header was set with Access-Control-Allow-Origin as "***"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to