fix(networking.tsx): handle updating proxy base url for non-local instances

This commit is contained in:
Krrish Dholakia 2025-06-02 13:42:31 -07:00
parent acf0fa803c
commit a10844f358

View file

@ -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 = {