Merge branch 'analytics' into dev
This commit is contained in:
commit
de487e572e
3 files changed
+28
-24
No files matched your search
+6
-2
@@ -36,8 +36,12 @@ export function getApiUrl(url: string, options: ApiUrlOptions = {}) {
|
||||
}
|
||||
|
||||
const { apiUrl = process.env.apiUrl || '', basePath = process.env.basePath || '' } = options;
|
||||
const useApiUrl = apiUrl && !isAbsoluteUrl(apiUrl) && !isAppRoute(url);
|
||||
const baseUrl = useApiUrl ? joinPath(basePath, apiUrl) : joinPath(basePath, '/api');
|
||||
const useApiUrl = apiUrl && !isAppRoute(url);
|
||||
const baseUrl = useApiUrl
|
||||
? isAbsoluteUrl(apiUrl)
|
||||
? apiUrl
|
||||
: joinPath(basePath, apiUrl)
|
||||
: joinPath(basePath, '/api');
|
||||
|
||||
return joinPath(baseUrl, url);
|
||||
}
|
||||
Reference in new issue
Block a user