pierrejeambrun commented on code in PR #42222:
URL: https://github.com/apache/airflow/pull/42222#discussion_r1760788520
##########
airflow/api_fastapi/app.py:
##########
@@ -43,6 +44,18 @@ def create_app() -> FastAPI:
init_views(app)
+ origins = [
+ "http://localhost:28080",
+ "http://localhost:8080",
+ ]
+ app.add_middleware(
+ CORSMiddleware,
+ allow_origins=origins,
+ allow_credentials=True,
+ allow_methods=["*"],
+ allow_headers=["*"],
+ )
+
Review Comment:
I don't know if you want to do that now or merge this one and do that in the
following PR but 'packaging' things to plug on the config and remove hardcoded
values to make that 'production' ready.
- for cors
https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#access-control-allow-headers
- axios.defaults.baseURL will not work depending on how they deploy the
`airflow fastapi-api` and only works with breeze
I approved just in case you want to move forward and do that later, we will
need to figure things out a bit
--
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]