Skip to content

Commit 784bac2

Browse files
fix(proxy_server.py): mount __next__ at / and /litellm
allows it to work when proxy is mounted on root
1 parent a2243aa commit 784bac2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

litellm/proxy/proxy_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,11 @@ async def openai_exception_handler(request: Request, exc: ProxyException):
750750
StaticFiles(directory=os.path.join(ui_path, "_next")),
751751
name="next_static",
752752
)
753+
app.mount(
754+
"/litellm/_next",
755+
StaticFiles(directory=os.path.join(ui_path, "_next")),
756+
name="next_static",
757+
)
753758
# print(f"mounted _next at {server_root_path}/ui/_next")
754759

755760
app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui")

0 commit comments

Comments
 (0)