server icon indicating copy to clipboard operation
server copied to clipboard

Add environment variable that allows you to append a prefix to all HTTP requests

Open HeeebsInc opened this issue 1 year ago • 1 comments

A lot of API tools that are opensource allow you to configure a prefix for the routes. This is needed for more customization in cloud environments. For example, if I had a DNS called myapp.com, and an ingress controller that mapped /triton to the triton pods, not having a prefix parameter will break the deployment.

What im proposing is a parameter that will globally append a prefix to the URLs. For example, the prefix tritonserver --http-url-prefix=triton, will cause the /v2/health/ready to become /triton/v2/health/ready (as well as every other route exposed by the server)

This is similar to the root_path parameter allowed by FastAPI

HeeebsInc avatar Jul 08 '24 21:07 HeeebsInc

This seems like a reasonable and relatively simple request to me. @GuanLuo @nnshah1 what do you think?

rmccorm4 avatar Aug 01 '24 19:08 rmccorm4