diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 739ab2ce776..f4761bda731 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -15,12 +15,8 @@ if (isLocal != true) { } export const updateProxyBaseUrl = (serverRootPath: string) => { - if (proxyBaseUrl) { - // check if proxybase url already ends with server root path, if not add it - if (!proxyBaseUrl.endsWith(serverRootPath)) { - proxyBaseUrl = `${proxyBaseUrl}${serverRootPath}`; - } -} + proxyBaseUrl = isLocal ? "http://localhost:4000" : window.location.origin + proxyBaseUrl += serverRootPath; }; const HTTP_REQUEST = {