ProxyTable satisfies two conditions at the same time (one of which is non)

satisfies both the beginning of / api and the need to forward to aaa,
/ api/order to bbb.


 "/api/": {  //  
    target: "http://dev.api.aaa.cn",
    changeOrigin: true
  },
  "/api/order": { 
    target: "http://dev.api.bbb.cn/",
    changeOrigin: true
  },

read the relevant documentation and did not find a suitable solution. ?


Why don't you write one as'/ api', and the other as'/ bpi''

< hr >
 '/api/': {
    target: 'http://dev.api.aaa.cn',
    changeOrigin: true,
    pathRewrite: {
      '^/api': '/'
    }
  },
  '/bpi': { 
    target: 'http://dev.api.bbb.cn/',
    changeOrigin: true,
    pathRewrite: {
      '^/bpi': '/'
    }
  },

you just change the order.

Menu