Skip to content

Commit f4aa9e8

Browse files
删除代理服务器配置 后端跨域
1 parent 05c890b commit f4aa9e8

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

src/network/request.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import axios from 'axios';
22

33
export function request(config){
44
const instance = axios.create({
5-
baseURL: "/api",
5+
// baseURL: "/api",
6+
withCredentials: true,
7+
// baseURL: "http://localhost:1003/",
8+
baseURL: "http://106.15.201.34:1003/",
69
timeout: 5000
710
})
811

vue.config.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ module.exports= {
1111
'common': '@/common'
1212
}
1313
}
14-
},
15-
devServer:{
16-
proxy:{
17-
'/api':{
18-
target:'http://106.15.201.34:8080/',
19-
changeOrigin: true,
20-
pathRewrite: {
21-
'^/api': ''
22-
}
23-
}
24-
}
25-
}
14+
}
15+
// ,
16+
// devServer:{
17+
// proxy:{
18+
// '/api':{
19+
// // target:'http://106.15.201.34:8080/',
20+
// target:'http://localhost:8080/',
21+
// changeOrigin: true,
22+
// pathRewrite: {
23+
// '^/api': ''
24+
// }
25+
// }
26+
// }
27+
// }
2628
}

0 commit comments

Comments
 (0)