I have config the proxyTable in the config/index.js created by vue-cli
proxyTable: { '/api': { target: 'http://ip:8080', changeOrigin: true, pathRewrite: { '^/api': '/api', }, },`
in my components ,when i use this.$http.get('/api/myapi'),the request is still send to localhost.
I have config the proxyTable in the config/index.js created by vue-cli
proxyTable: { '/api': { target: 'http://ip:8080', changeOrigin: true, pathRewrite: { '^/api': '/api', },
},`in my components ,when i use this.$http.get('/api/myapi'),the request is still send to localhost.