How to configure reverse proxy in vue (solve cross-domain)
1. The front and back computers are connected to the same LAN.
2. Change the reverse proxy in config/index.js (find the following code and change target to the back-end ip address and port number)
proxyTable: {
'/api': {
target: 'http://localhost:3000',//需要代理的地址
changeOrigin: true,
pathRewrite: {
'^/api':""
}
}
}