litellm/ui/litellm-dashboard/src/utils
ryan-crabbe-berri 74ff8d0ff9
fix(ui): navigate to /ui/login/ with trailing slash via hard navigation (#33561)
* fix(ui): navigate to /ui/login/ with trailing slash via hard navigation

Logged-out redirects targeted /ui/login without the trailing slash, so
Starlette's StaticFiles(html=True) mount answered with a 307 whose
absolute Location is built from the scheme the container sees. Behind a
TLS-terminating reverse proxy uvicorn does not trust X-Forwarded-Proto
by default, so the redirect downgraded https to http and stranded users
on an unreachable URL (#33454). The auth guard also used the Next client
router for this navigation, which first requests an RSC payload that the
static export cannot serve, producing 404s before falling back to a full
page load.

Centralize the login URL in getLoginUrl(), which always emits the
trailing slash so no server redirect fires, and use
window.location.replace for the login redirects so no RSC fetch is
attempted.

* test(ui): expect trailing slash in expired-token login redirect
2026-07-16 12:18:55 -07:00
..
budgetUtils.ts Show absolute date in Budget Reset column 2026-04-23 15:57:22 -07:00
cookieUtils.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
cookieUtils.ts fix(ui): break logout redirect loop across origins (#29360) 2026-05-30 19:02:29 -07:00
dataUtils.test.ts Usage Entity labels 2025-12-12 12:13:51 -08:00
dataUtils.ts Usage Entity labels 2025-12-12 12:13:51 -08:00
debounceConstants.ts refactor(ui): standardize debounce waits behind shared DEBOUNCE_WAIT_MS constant (#33040) 2026-07-13 12:19:57 -07:00
errorPatterns.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
errorUtils.test.ts Add unit tests for 5 previously untested UI dashboard files 2026-03-16 12:53:20 -07:00
errorUtils.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
jwtUtils.test.ts useAuthorized refactor 2026-02-04 16:37:45 -08:00
jwtUtils.ts useAuthorized refactor 2026-02-04 16:37:45 -08:00
keyExpiryUtils.test.ts fix(ui): require new expiration when regenerating an expired key (#29838) 2026-06-06 09:18:19 -07:00
keyExpiryUtils.ts fix(ui): require new expiration when regenerating an expired key (#29838) 2026-06-06 09:18:19 -07:00
keyUpdateUtils.test.ts Key Max Budget Removal Error Fix 2025-10-17 12:04:58 -07:00
keyUpdateUtils.ts Key Max Budget Removal Error Fix 2025-10-17 12:04:58 -07:00
licenseUtils.test.ts feat(ui): show exact license expiration date in usage cards 2026-07-15 16:52:21 -07:00
licenseUtils.ts feat(ui): show exact license expiration date in usage cards 2026-07-15 16:52:21 -07:00
localStorageUtils.test.ts feat: hide new badges 2025-12-31 10:42:34 -08:00
localStorageUtils.ts feat: hide new badges 2025-12-31 10:42:34 -08:00
mcpHeaderUtils.test.ts feat(mcp): Add tool call and tool list support via UI for Oauth mcps (#28454) 2026-05-22 09:04:04 -07:00
mcpHeaderUtils.ts fix(mcp): load MCP tool configuration tools via the OBO/passthrough-aware GET path (#29960) 2026-06-08 19:58:51 -07:00
mcpTokenStore.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
mcpTokenStore.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
mcpToolCrudClassification.test.ts Add unit tests for 5 previously untested UI dashboard files 2026-03-16 12:53:20 -07:00
mcpToolCrudClassification.ts feat(ui): group MCP tools by CRUD risk category in allowlist panels (#23403) 2026-03-11 21:15:25 -07:00
migratedPages.test.ts feat(ui): migrate api-keys landing to App Router path route (#30699) 2026-06-18 17:38:07 -07:00
migratedPages.ts feat(ui): re-add chat UI, allow simple UI for MCP OBO auth (#31893) 2026-07-03 12:36:36 -07:00
pkce.ts Extract shared PKCE helpers into src/utils/pkce.ts 2026-04-16 10:35:52 -07:00
proxyUtils.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
proxyUtils.ts added and ran prettier autoformatter 2025-10-04 18:19:48 -07:00
returnUrlUtils.test.ts fix(ui): navigate to /ui/login/ with trailing slash via hard navigation (#33561) 2026-07-16 12:18:55 -07:00
returnUrlUtils.ts fix(ui): navigate to /ui/login/ with trailing slash via hard navigation (#33561) 2026-07-16 12:18:55 -07:00
roles.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
roles.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
secureStorage.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
teamUtils.test.ts Deprecate useTeam in favor of react query 2025-12-23 20:15:42 -08:00
teamUtils.ts Deprecate useTeam in favor of react query 2025-12-23 20:15:42 -08:00
textUtils.test.ts Adding unit testing coverage 2026-01-03 17:25:46 -08:00
textUtils.ts [Feature] UI - Add LiteLLM Params to Edit Model (#16496) 2025-11-11 18:52:11 -08:00