feat: support sub route config (#3071)
* feat: support sub route config * dockerfile * fix upload * delete unused code
This commit is contained in:
@@ -9,3 +9,12 @@ export const getUserFingerprint = async () => {
|
||||
export const hasHttps = () => {
|
||||
return window.location.protocol === 'https:';
|
||||
};
|
||||
|
||||
export const getWebReqUrl = (url: string = '') => {
|
||||
if (!url) return '/';
|
||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL;
|
||||
if (!baseUrl) return url;
|
||||
|
||||
if (!url.startsWith('/') || url.startsWith(baseUrl)) return url;
|
||||
return `${baseUrl}${url}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user