1 Star 4 Fork 1

温泉里的鱼 / books-unapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 719 Bytes
一键复制 编辑 原始数据 按行查看 历史
温泉里的鱼 提交于 2021-11-04 16:49 . 解决app接口无法访问问题
module.exports = {
devServer: {
disableHostCheck: true,
proxy: {
'/api': { // 匹配所有以 '/api1'开头的请求路径
target: 'https://sou.jiaston.com/', // 代理目标的基础路径
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/bookApi': { // 匹配所有以 '/api1'开头的请求路径
target: 'http://shuapi.jiaston.com/', // 代理目标的基础路径
changeOrigin: true,
pathRewrite: {
'^/bookApi': ''
}
}
}
}
}
/*
changeOrigin设置为true时,服务器收到的请求头中的host为:localhost:5000
changeOrigin设置为false时,服务器收到的请求头中的host为:localhost:8080
changeOrigin默认值为true
*/
HTML/CSS
1
https://gitee.com/yty1998/books-unapp.git
git@gitee.com:yty1998/books-unapp.git
yty1998
books-unapp
books-unapp
master

搜索帮助