good version for 算法注册

This commit is contained in:
2026-02-15 21:23:28 +08:00
parent 3c03777b97
commit 62ea5d36a5
115 changed files with 9566 additions and 1576 deletions

View File

@@ -14,8 +14,24 @@ export default defineConfig({
'/api': {
target: 'http://localhost:8001',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api/v1'),
timeout: 600000 // 10分钟超时
rewrite: (path) => {
// 如果路径已经是 /api/v1/ 开头,则不重写
if (path.startsWith('/api/v1/')) {
return path
}
// 否则将 /api/ 重写为 /api/v1/
return path.replace(/^\/api\//, '/api/v1/')
},
timeout: 600000, // 10分钟超时
// 确保认证头在重定向时被保留
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
// 确保认证头被正确传递
if (req.headers.authorization) {
proxyReq.setHeader('Authorization', req.headers.authorization)
}
})
}
}
}
},