Fixed support for custom URL prefixes in Chatbot Web UI#757
Open
vlasky wants to merge 2 commits intomozilla-ai:mainfrom
Open
Fixed support for custom URL prefixes in Chatbot Web UI#757vlasky wants to merge 2 commits intomozilla-ai:mainfrom
vlasky wants to merge 2 commits intomozilla-ai:mainfrom
Conversation
Collaborator
|
Hopefully I'll have a chance to review and test this this week. |
Contributor
Author
Hello, are you now in a better position to review and test this? |
588bdb1 to
8f50fe6
Compare
…edirect - The prefix can be specified with or without a trailing slash (e.g., --url-prefix /llm or --url-prefix /llm/) - Automatically add trailing slash when necessary via HTTP redirect - Add send_redirect() method for HTTP redirects - Reject prefix collisions (e.g., /llmfoo when prefix is /llm) - Update man page example to use /llm
8f50fe6 to
20716e3
Compare
Contributor
Author
|
@cjpais I have improved this - the URL prefix can be specified with or without a trailing slash (e.g., --url-prefix /llm or --url-prefix /llm/). It will automatically add the trailing slash when necessary via HTTP redirect. |
Collaborator
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.
When running the server and specifying a custom URL prefix (e.g. /llm), the Chatbot Web UI JS code will access the endpoints with the proper URL prefix prepended to the path.