build: 前端代理调整

master
2 days ago
parent b0190e2c5f
commit 1d41af1e7c

@ -89,11 +89,17 @@ export default ({ mode }: { mode: string }) => {
// rewrite: (path: string) => path.replace(new RegExp("^" + env.VITE_APP_BASE_API), ""),
},
// Dify 知识库后端代理
"/p30": {
[env.VITE_DIFY_API_BASE]: {
target: env.VITE_DIFY_API_BASE_URL,
secure: false,
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/p30/, ""),
rewrite: (path: string) => path.replace(new RegExp("^" + env.VITE_DIFY_API_BASE), ""),
},
// 文件服务后端代理
[env.VITE_STORAGE_API_BASE]: {
target: env.VITE_STORAGE_API_BASE_URL,
changeOrigin: true,
rewrite: (path: string) => path.replace(new RegExp("^" + env.VITE_STORAGE_API_BASE), ""),
},
},
},

Loading…
Cancel
Save