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