chore: sync
This commit is contained in:
@@ -36,3 +36,10 @@ export const getApiBaseUrl = () => {
|
||||
};
|
||||
|
||||
export const getApiOrigin = () => stripApiSuffix(getApiBaseUrl());
|
||||
|
||||
export const isAbsoluteUrl = (value) => hasHttpProtocol(String(value || ''));
|
||||
|
||||
export const resolveMediaUrl = (value) => {
|
||||
if (!value) return value;
|
||||
return isAbsoluteUrl(value) ? value : `${getApiOrigin()}${value}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user