mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(networking.tsx): handle updating proxy base url for non-local instances
This commit is contained in:
parent
acf0fa803c
commit
a10844f358
1 changed files with 2 additions and 6 deletions
|
|
@ -15,12 +15,8 @@ if (isLocal != true) {
|
|||
}
|
||||
|
||||
export const updateProxyBaseUrl = (serverRootPath: string) => {
|
||||
if (proxyBaseUrl) {
|
||||
// check if proxybase url already ends with server root path, if not add it
|
||||
if (!proxyBaseUrl.endsWith(serverRootPath)) {
|
||||
proxyBaseUrl = `${proxyBaseUrl}${serverRootPath}`;
|
||||
}
|
||||
}
|
||||
proxyBaseUrl = isLocal ? "http://localhost:4000" : window.location.origin
|
||||
proxyBaseUrl += serverRootPath;
|
||||
};
|
||||
|
||||
const HTTP_REQUEST = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue