diff --git a/tests/proxy_migration_tests/test_ui_root_path.py b/tests/proxy_migration_tests/test_ui_root_path.py index 7978ca394b9..474696772af 100644 --- a/tests/proxy_migration_tests/test_ui_root_path.py +++ b/tests/proxy_migration_tests/test_ui_root_path.py @@ -32,6 +32,7 @@ class TestUIRootPath(unittest.TestCase): '' '' ) + (source / "index.txt").write_text('[{"href":"/favicon.ico?version=1"}]') (source / "app.js").write_text('fetch("/litellm/.well-known/litellm-ui-config")') (source / "font.woff2").write_bytes(bytes(range(256))) return source @@ -50,6 +51,7 @@ class TestUIRootPath(unittest.TestCase): self.assertIn('href="/services/llm/get_favicon"', (runtime / "index.html").read_text()) self.assertIn('href="/services/llm/favicon.ico?version=1"', (runtime / "index.html").read_text()) self.assertIn('src="/services/llm/ui/assets/logo.png"', (runtime / "index.html").read_text()) + self.assertIn("/services/llm/favicon.ico?version=1", (runtime / "index.txt").read_text()) self.assertEqual(runtime.stat().st_mode & 0o005, 0o005) self.assertEqual((runtime / "index.html").stat().st_mode & 0o004, 0o004) self.assertIn("/services/llm/.well-known/litellm-ui-config", (runtime / "app.js").read_text()) diff --git a/ui/prepare-root-path.sh b/ui/prepare-root-path.sh index b55341707de..bdd17e25840 100644 --- a/ui/prepare-root-path.sh +++ b/ui/prepare-root-path.sh @@ -30,13 +30,13 @@ if [ -n "$prefix" ]; then for file do sed -e "s|/litellm-asset-prefix|$prefix|g" \ -e "s|/litellm/\.well-known/litellm-ui-config|$prefix/.well-known/litellm-ui-config|g" \ + -e "s|/favicon.ico|$prefix/favicon.ico|g" \ "$file" > "$file.tmp" case "$file" in *.html) sed -e "s|||g" \ -e "s|src=\"/ui/assets/|src=\"$prefix/ui/assets/|g" \ -e "s|href=\"/get_favicon\"|href=\"$prefix/get_favicon\"|g" \ - -e "s|href=\"/favicon.ico|href=\"$prefix/favicon.ico|g" \ "$file.tmp" > "$file" rm "$file.tmp" ;;