init 3
This commit is contained in:
@@ -29,7 +29,25 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
"/base": {
|
||||
target: "http://127.0.0.1:9098",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/base/, ""),
|
||||
rewrite: path => path.replace(/^\/base/, "")
|
||||
},
|
||||
// 第二个代理后端地址
|
||||
"/otherApi": {
|
||||
target: "http://127.0.0.1:3290",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/otherApi/, "")
|
||||
},
|
||||
// biz 接口
|
||||
"/biz": {
|
||||
target: "http://127.0.0.1:8089",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/biz/, "")
|
||||
},
|
||||
// auth 接口
|
||||
"/auth": {
|
||||
target: "http://127.0.0.1:9098",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/auth/, "/auth/user/rd"),
|
||||
configure: (proxy, options) => {
|
||||
// 添加调试日志
|
||||
proxy.on("proxyReq", (proxyReq, req, res) => {
|
||||
@@ -52,18 +70,6 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
||||
console.error("代理错误:", err);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 第二个代理后端地址
|
||||
"/otherApi": {
|
||||
target: "http://127.0.0.1:3290",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/otherApi/, "")
|
||||
},
|
||||
// 第三个代理后端地址
|
||||
"/biz": {
|
||||
target: "http://127.0.0.1:8089",
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/biz/, "")
|
||||
}
|
||||
},
|
||||
// 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
|
||||
|
||||
Reference in New Issue
Block a user