diff --git a/packages/web/src/utility/resolveApi.ts b/packages/web/src/utility/resolveApi.ts index f2c00b55..23333b0b 100644 --- a/packages/web/src/utility/resolveApi.ts +++ b/packages/web/src/utility/resolveApi.ts @@ -9,7 +9,7 @@ export default function resolveApi() { if (apiUrl) { return apiUrl; } - return window.location.href.replace(/\/*$/, ''); + return (window.location.origin + window.location.pathname).replace(/\/*$/, ''); } export function resolveApiHeaders() {