diff --git a/packages/client/src/api/api.js b/packages/client/src/api/api.js index 99b085b2fb..a875a61299 100644 --- a/packages/client/src/api/api.js +++ b/packages/client/src/api/api.js @@ -3,14 +3,6 @@ */ let cache = {} -/** - * Makes a fully formatted URL based on the SDK configuration. - */ -const makeFullURL = path => { - const isProxy = window.location.pathname.startsWith("/app/") - return `${isProxy ? "/app/" : "/"}${path}`.replace("//", "/") -} - /** * Handler for API errors. */ @@ -81,8 +73,7 @@ const makeCachedApiCall = async params => { */ const requestApiCall = method => async params => { const { url, cache = false } = params - const fullURL = makeFullURL(url) - const enrichedParams = { ...params, method, url: fullURL } + const enrichedParams = { ...params, method, url } return await (cache ? makeCachedApiCall : makeApiCall)(enrichedParams) }