feat: support sub route config (#3071)
* feat: support sub route config * dockerfile * fix upload * delete unused code
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getWebReqUrl } from '@fastgpt/web/common/system/utils';
|
||||
import { useSystemStore } from './useSystemStore';
|
||||
export const getDocPath = (path: string) => {
|
||||
const feConfigs = useSystemStore.getState().feConfigs;
|
||||
@@ -5,5 +6,6 @@ export const getDocPath = (path: string) => {
|
||||
if (!feConfigs?.docUrl) return '';
|
||||
if (!path.startsWith('/')) return path;
|
||||
if (feConfigs.docUrl.endsWith('/')) return feConfigs.docUrl.slice(0, -1);
|
||||
return feConfigs.docUrl + path;
|
||||
|
||||
return getWebReqUrl(feConfigs.docUrl + path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user