Now I have such a requirement. I hope that all requests for '/test/' in the express project will be requested for '/' at the end. How can such a requirement pass through the http-proxy-middleware middleware? To realize it? Or is there any other way to achieve it?
習慣沉默2017-05-16 13:28:38
If used vue-cli
的话在config/index.js
Configure in
proxyTable: {
'/api': {
target: 'http://127.0.0.1:8888',
changeOrigin: true,
pathRewrite: {
'^/api': '/'
}
}
},