<@ULVA73B9P> I have two different URLs for prefect...
# marvin-in-the-wild
p
@Marvin I have two different URLs for prefect API and for UI. Can I change the URL returned by the prefect to point to UI instead to API?
m
Yes, you can change the URL that Prefect returns to point to the UI instead of the API by configuring certain environment variables. For Prefect 2.x: - You need to set the
PREFECT_UI_API_URL
environment variable to the external proxy URL for the UI. Example:
Copy code
export PREFECT_UI_API_URL="<https://your-prefect-ui-url/api>"
Detailed documentation can be found here: https://docs-2.prefect.io/latest/guides/settings/ For Prefect 3.x: - The same environment variable
PREFECT_UI_API_URL
should be set to your external proxy URL. Example:
Copy code
export PREFECT_UI_API_URL="<https://your-prefect-ui-url/api>"
You can refer to this page for more details: https://docs-3.prefect.io/3.0/manage/settings-and-profiles This configuration helps especially when you are running the Prefect UI behind a reverse proxy like Nginx or Traefik.