Skip to content

server: Add ability to mount server at prefix #14544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oluwandabira
Copy link

This is a helpful feature in cases where the server is behind a reverse proxy mounted on a non root path.

@@ -4800,20 +4800,22 @@ int main(int argc, char ** argv) {
// Router
//

const char* server_prefix = params.server_prefix.c_str();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const char* server_prefix = params.server_prefix.c_str();
const char * server_prefix = params.server_prefix.c_str();

@@ -2734,6 +2734,13 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
params.public_path = value;
}
).set_examples({LLAMA_EXAMPLE_SERVER}).set_env("LLAMA_ARG_STATIC_PATH"));
add_opt(common_arg(
{"--prefix"}, "PREFIX",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--prefix can be quite vague to understand, risk of clashing with other features in the future. I think it should be --api-prefix for clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants