vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

vue-resource could work with proxyTable configration?

Open YanwuSenlu opened this issue 8 years ago • 2 comments

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.

YanwuSenlu avatar Feb 14 '17 04:02 YanwuSenlu

👍 same here, couldn't find the reason, any help much appreciated.

lemmycaution avatar Jun 25 '17 12:06 lemmycaution

I replaced the 'localhost' in the target to IP, and all clear.

mario-shang avatar Jan 09 '18 01:01 mario-shang