您的位置:首页 > 产品设计 > UI/UE

Vue-cli proxyTable 解决开发环境的跨域问题

2017-06-08 12:27 841 查看
Vue-cli proxyTable 解决开发环境的跨域问题

1.修改config文件里index.js的proxyTable

//方法
proxyTable: {
'/vue': {
//请求的地址是ahttp://test.php.com/vue/
target: 'http://test.php.com/vue/',
changeOrigin: true,
pathRewrite: {
'^/vue': ''
}
}
},

官方文档:https://vuejs-templates.github.io/webpack/proxy.html
参考文件:http://blog.csdn.net/zgrkaka/article/details/62230507
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: