Open majikman111 opened 9 months ago
Came across this recently. I'm currently rewriting prefix/api to /api using traefik rules. I agree it would be useful to have support for configuring the api to run at a path prefix too.
I can confirm this. Frontend assets cannot be mapped from one path to the other with proxy, no matter the PREFECT_UI_URL
setting.
We will look into this, thank you all for raising and commenting
Came across this recently. After set PREFECT_UI_URL
, it still does not work.
Does anyone have a workaround for this? I'm pulling my hair out :)
First check
Bug summary
I am running Prefect in a Kubernetes cluster behind an nginx reverse proxy and when setting the
PREFECT_UI_SERVE_BASE
setting the UI base path is updated but api base path is not, resulting in a rendered UI with no flow content. Additionally, updating thePREFECT_UI_API_URL
setting changes what path the UI requests but not the path the api is actually served under.Reproduction
Error
No response
Versions
Additional context
Could potentially be solved by passing a configurable
root_path
argument to the FastAPIapi_app
object if available from settings here https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/server.py#L615Related to #11472