| history: { | history: { | ||||
| type: 'browser', | type: 'browser', | ||||
| }, | }, | ||||
| exportStatic: {}, | |||||
| plugins: [ | plugins: [ | ||||
| '@react-dev-inspector/umi4-plugin', | '@react-dev-inspector/umi4-plugin', | ||||
| '@umijs/plugins/dist/tailwindcss', | '@umijs/plugins/dist/tailwindcss', | ||||
| ], | ], | ||||
| proxy: [ | proxy: [ | ||||
| { | { | ||||
| context: ['/api', '/v1'], | |||||
| target: 'http://127.0.0.1:9380/', | |||||
| context: ['/ss-ragflow-api/api', '/ss-ragflow-api/v1'], | |||||
| target: 'http://pi16:8321', | |||||
| changeOrigin: true, | changeOrigin: true, | ||||
| ws: true, | ws: true, | ||||
| logger: console, | logger: console, | ||||
| // pathRewrite: { '^/v1': '/v1' }, | |||||
| // pathRewrite: { '^/ss-ragflow-api/api': '/api', '^/ss-ragflow-api/v1': '/v1' }, | |||||
| }, | }, | ||||
| ], | ], | ||||
| const text = ` | const text = ` | ||||
| ~~~ html | ~~~ html | ||||
| <iframe | <iframe | ||||
| src="${location.origin}/chat/share?shared_id=${token}&from=${form}&auth=${beta}" | |||||
| src="${location.origin}/ss-ragflow/chat/share?shared_id=${token}&from=${form}&auth=${beta}" | |||||
| style="width: 100%; height: 100%; min-height: 600px" | style="width: 100%; height: 100%; min-height: 600px" | ||||
| frameborder="0" | frameborder="0" | ||||
| > | > |
| const getUrlWithToken = (token: string, from: string = 'chat') => { | const getUrlWithToken = (token: string, from: string = 'chat') => { | ||||
| const { protocol, host } = window.location; | const { protocol, host } = window.location; | ||||
| return `${protocol}//${host}/chat/share?shared_id=${token}&from=${from}`; | |||||
| return `${protocol}//${host}/ss-ragflow/chat/share?shared_id=${token}&from=${from}`; | |||||
| }; | }; | ||||
| const useFetchTokenListBeforeOtherStep = () => { | const useFetchTokenListBeforeOtherStep = () => { |