根据ua处理下载按钮

This commit is contained in:
2026-02-09 10:53:03 +02:00
parent 45ce4d434c
commit b3f39eadf5
2 changed files with 82 additions and 41 deletions
-7
View File
@@ -22,13 +22,6 @@ export default defineConfig({
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, ''),
autoRewrite: true,
// 3. 关键:将路径重写,在前面补上 /api/v1
// 验证请求是否进入代理,可以在终端看到打印
configure: (proxy, _options) => {
proxy.on('proxyReq', (proxyReq, req, _res) => {
console.log('代理请求:', req.method, req.url, ' -> ', proxyReq.path)
})
},
},
},
},