feat: 前端接口代理

This commit is contained in:
Gsh
2025-06-19 23:45:22 +08:00
parent bc91a8cff2
commit a89e11d132
12 changed files with 133 additions and 7 deletions

View File

@@ -23,5 +23,17 @@ export default defineConfig((cnf) => {
},
},
},
server: {
proxy: {
// 代理所有以 /prod-api 开头的请求
"/prod-api": {
target: "https://ccnetcore.com", // 接口域名
changeOrigin: true, // 改变源
secure: false, // 如果目标服务器使用 HTTPS 且证书无效,需要设置为 false
},
},
},
};
});