前端跨域配置

 

####VUE项目配置跨域

##在vue-project文件下config下的index中
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
##在这里添加以下api
'/api':{
target: 'http://127.0.0.1:8000/',
changeOrigin: true, //改变源,
pathRewrite: {???????
'^/api': '' //路径重写?
}
}
},

上一篇:CodeForces 1294F Three Paths on a Tree


下一篇:Codeforces 1294F Three Paths on a Tree