fix(admin): proxy /api/docs without prefix strip so Swagger UI works through vite dev server
This commit is contained in:
@@ -31,6 +31,11 @@ export default defineConfig({
|
||||
// 端口被占时直接报错退出,而不是静默换端口导致浏览器看到旧实例
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
// Swagger 挂载在后端 /api/docs(不走去掉 /api 前缀的改写),需放在 '/api' 之前
|
||||
'/api/docs': {
|
||||
target: 'http://127.0.0.1:3001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:3001',
|
||||
changeOrigin: true,
|
||||
|
||||
Reference in New Issue
Block a user