pierrejeambrun commented on code in PR #46900:
URL: https://github.com/apache/airflow/pull/46900#discussion_r1963167713


##########
airflow/ui/src/main.tsx:
##########
@@ -58,6 +59,9 @@ axios.interceptors.request.use((config) => {
   return config;
 });
 
+// Dynamically set the base URL for XHR requests based on the meta tag.
+OpenAPI.BASE = 
document.querySelector("meta[name='backend-server-base-url']")?.getAttribute("content")
 ?? "";

Review Comment:
   Updated, should look better.
   
   Basically the index file is templated and the meta tag will always be 
present taking the config value for `fastapi.base_url`. (default to 
`localhost:29091` but can be replaced with anything else, `locahost:9091` in my 
example, we can't add a prefix yet such as `locahost:29091/d12345` because 
static file resolution will fail until we do 
https://github.com/apache/airflow/issues/46548)



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