热门

最新

红包

立Flag

投票

同城

我的

发布
u014694850
TaerenFabric
5 年前
trueu014694850

Vue Cli 4中,为了解决开发时遇到的服务器和开发机器不同域的问题,可以配置vue.config.js文件,该文件的路径必须置于package.json同位置
//润刚created this file in order to resolve the cross-problemn
// to our django server
module.exports={
devServer: {
host: '192.168.2.110',
port: 8002,
https:false,
open:true,
disableHostCheck:true,
proxy:{
"/user/":{
target:"http://192.168.2.110:8000",
changeOrigin:true,
pathRewrite:{
"^/user":"/"
}
}
}
},
}

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
求一个解题思路
立即登录