diff --git a/src/views/HomePage.vue b/src/views/HomePage.vue index 61ac3b3..997f2a7 100644 --- a/src/views/HomePage.vue +++ b/src/views/HomePage.vue @@ -544,7 +544,7 @@ const handleRemoveBackground = async () => { const controller = new AbortController() const timeoutId = setTimeout(() => controller.abort(), 180000) - const response = await fetch('/tools/rmbg/file/free', { + const response = await fetch('/api/v1/tools/rmbg/file/free', { method: 'POST', body: formData, signal: controller.signal diff --git a/src/views/tools/remove_background/remove_background.vue b/src/views/tools/remove_background/remove_background.vue index 08428cc..da75a18 100644 --- a/src/views/tools/remove_background/remove_background.vue +++ b/src/views/tools/remove_background/remove_background.vue @@ -635,7 +635,7 @@ const handleRemoveBackground = async () => { const controller = new AbortController() const timeoutId = setTimeout(() => controller.abort(), 180000) - const response = await fetch('/tools/rmbg/file/free', { + const response = await fetch('/api/v1/tools/rmbg/file/free', { method: 'POST', body: formData, signal: controller.signal diff --git a/vite.config.ts b/vite.config.ts index f3b5460..26772d2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -65,17 +65,17 @@ export default defineConfig(({ mode, command }) => { allow: [appsDir] }, proxy: { - '/api': { + '/api/action': { target: JCLOUD_URL, changeOrigin: true, secure: true, }, - '/jingrow': { + '/api/data': { target: JCLOUD_URL, changeOrigin: true, secure: true, }, - '/tools': { + '/api/v1/tools': { target: BACKEND_URL, changeOrigin: true, secure: true,