mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(ui): serve assets under ui prefix
This commit is contained in:
parent
bd23c44cb1
commit
a24d6d5c91
1 changed files with 10 additions and 3 deletions
|
|
@ -76,9 +76,16 @@ http {
|
|||
# /ui[/<page>] — the dashboard's JS hardcodes URLs under this prefix
|
||||
# (router.replace("/ui"), buildLoginUrlWithReturn("/ui/login"), ...).
|
||||
# Mirror what FastAPI StaticFiles(mount="/ui") did in the monolithic
|
||||
# proxy_server: serve /ui/<page> from out/<page>.html, with App
|
||||
# Router-aware fallback (out/<page>/index.html) and a final SPA
|
||||
# fallback to out/index.html for client-side routes.
|
||||
# proxy_server: serve /ui/assets/... from out/assets/... and serve
|
||||
# /ui/<page> from out/<page>.html, with App Router-aware fallback
|
||||
# (out/<page>/index.html) and a final SPA fallback to out/index.html
|
||||
# for client-side routes.
|
||||
location ^~ /ui/assets/ {
|
||||
alias /usr/share/nginx/html/assets/;
|
||||
try_files $uri =404;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
location = /ui { try_files /index.html =404; }
|
||||
location = /ui/ { try_files /index.html =404; }
|
||||
location ~ ^/ui/(.+)$ {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue