fix(ui): Move routes to /app to avoid conflict with API endpoints#8978
Merged
mudler merged 1 commit intomudler:masterfrom Mar 13, 2026
Merged
fix(ui): Move routes to /app to avoid conflict with API endpoints#8978mudler merged 1 commit intomudler:masterfrom
mudler merged 1 commit intomudler:masterfrom
Conversation
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mudler
reviewed
Mar 12, 2026
2194008 to
807f5cd
Compare
5ece92f to
2942d00
Compare
Also test for regressions in HTTP GET API key exempted endpoints because this list can get out of sync with the UI routes. Also fix support for proxying on a different prefix both server and client side. Signed-off-by: Richard Palethorpe <io@richiejp.com>
2942d00 to
58d2a17
Compare
mudler
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The /backends enpoint is part of the well established API and returns JSON. It conflicts with the react UI's routes.
When the SPA router is being used then the user can navigate to it as expected, but if they navigate directly to it with the address bar or refresh they get JSON.
Previously the UI was at /browse, which is also where user bookmarks will be directed as well as proxy configurations in theory.
UPDATE: Moved routes to /app instead per review comment and /browse redirects to /app. Also added regression tests for exempted endpoints because they got out of sync with the routes.
Notes for Reviewers
It's possible to pay attention to the HTTP header for what content the client will accept and return HTML or JSON. However it makes the route registration more complicated.
Also in theory, even if HTML is requested, the client may not want a react SPA, they may just want simple HTML.
Finally if a user really wants the UI to be available at / this can be achieved with a proxy server and allowing the API url to be configured.
Signed commits