Michael Dyer
09/09/2022, 8:02 PMprefect orion start --host 0.0.0.0
I have a reverse proxy (traefik) pointing to the container and I can access the UI at <https://my-host:4200>
. The reverse proxy is handling ssl offload.
The UI is displayed, but unable to connect to the API and I'm receiving the following message:
Can't connect to Orion API at <http://127.0.0.1:4200/api>. Check that it's accessible from your machine.
Q. Is there a way to configure the Orion UI so that it uses a relative URL /api
? (i.e. https://my-host:4200/api)?Christopher Boyd
09/09/2022, 8:30 PMCole Murray
09/09/2022, 8:38 PMChristopher Boyd
09/09/2022, 8:40 PMMichael Dyer
09/09/2022, 8:45 PMRyan Peden
09/09/2022, 8:45 PMPREFECT_ORION_UI_API_URL
is the environment variable you will need to set to ensure the UI calls the correct API URL.Michael Dyer
09/09/2022, 8:54 PMPREFECT_ORION_UI_API_URL
allows me to access the api. The significant downside is that I need to modify the configuration for each deployment.
A relative URL would avoid the extra per-deployment configuration by simply re-using the protocol://host:port from which the UI is being served.export const getAPIAddress = () => `${window.location.protocol}//${window.location.hostname}:4200/api`;