ui
ui copied to clipboard
Allow ui to be served on a subpath
I'm running prefect-server via the prefect-server helm chart and I would like to host the prefect ui on [mydomain]/prefect-ui. I've set up an ingress on my kubernetes cluster which routes get requests to [mydomain]/prefect-ui to the prefect-ui pod, however the index.html which loads contains absolute paths e.g. https://github.com/PrefectHQ/ui/blob/ca6ff1b6ea6f4f6c1839e9990bc3a35b6d667937/public/index.html#L40-L42
so my browser looks for these resources at e.g. [mydomain]/fonts/fonts.css instead of at [mydomain]/prefect-ui/fonts/fonts.css so the request is no longer routed to the prefect-ui pod and I get a 404 error on those get requests.
I believe changing the abosolute paths to relative paths (remove initial forward slash) would fix the issue, but I am relatively new to routing and am unfamiliar with Vue so I may be off base. Thanks!
@znicholasbrown - would welcome your thoughts on this one
Hi @Adam-D-Lewis - I'd recommend you rebuild your UI using the npm run build
command after adding the proper paths to the vue config - the reason being that adding relative paths or swapping from native history mode can break other implementations and it's not something we're able to maintain at the moment.