vue之proxyTable跨域
程序员文章站
2022-03-28 12:31:13
...
config文件夹下的index.js中
module.exports = {
dev: { //开发环境
assetsSubDirectory: 'static',
assetsPublicPath: '/',
//跨域设置
proxyTable: {
'/rest': {
target: "https://www.xxxx.com/", //要跨域的接口域名
changeOrigin: true, //是否跨域
pathRewrite: { //地址重写
'^/rest': ''
}
}
},
上一篇: 一张只需1分钱 米家喷墨打印机图赏
下一篇: android log日志工具的使用