diff --git a/ui/litellm-dashboard/src/components/constants.tsx b/ui/litellm-dashboard/src/components/constants.tsx index a9a38806c68..c56b382f577 100644 --- a/ui/litellm-dashboard/src/components/constants.tsx +++ b/ui/litellm-dashboard/src/components/constants.tsx @@ -7,7 +7,9 @@ export const useBaseUrl = () => { useEffect(() => { if (typeof window !== "undefined") { const { protocol, host } = window.location; - setBaseUrl(`${protocol}//${host}`); + if (protocol === "http:" || protocol === "https:") { + setBaseUrl(`${protocol}//${host}`); + } } }, []); // Removed router dependency