-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
48 lines (48 loc) · 1.89 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
devServer: {
proxy: {
"/api/": {
// 101.35.201.95
// http://localhost:3300
// localhost
// target: "http://localhost:3300/", //要跨域的域名 目标地址
target: "http://www.leftcloud.top:3300", //要跨域的域名 目标地址
changeOrigin: true, //是否开启跨域 是否更改源路径
ws: true,
pathRewrite: {
// "^/api": "" // /api/ / 凡是/api开头的地址都可以跨域
"^/": "" // /api/ / 凡是/api开头的地址都可以跨域
}
},
"/api2/": {
// 101.35.201.95
// http://localhost:3300
// localhost
// target: "http://localhost:127.0.0.1:18081/", //要跨域的域名 目标地址
// target: "http://localhost:3300/", //要跨域的域名 目标地址
// target: "http://www.leftcloud.top:3300/", //要跨域的域名 目标地址
target: "http://www.leftcloud.top", //要跨域的域名 目标地址
changeOrigin: true, //是否开启跨域 是否更改源路径
ws: true,
pathRewrite: {
// "^/api": "" // /api/ / 凡是/api开头的地址都可以跨域
"^/": "" // /api/ / 凡是/api开头的地址都可以跨域
}
},
"/hello": {
// 101.35.201.95
// http://localhost:3300
// localhost
// target: "http://localhost:127.0.0.1:18081/", //要跨域的域名 目标地址
// target: "http://localhost:3300/", //要跨域的域名 目标地址
target: "http://www.leftcloud.top:30080/", //要跨域的域名 目标地址
changeOrigin: true, //是否开启跨域 是否更改源路径
ws: true,
pathRewrite: {
// "^/api": "" // /api/ / 凡是/api开头的地址都可以跨域
"^/": "" // /api/ / 凡是/api开头的地址都可以跨域
}
}
}
}
}