39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
module.exports = {
|
|
devServer: {
|
|
port: 8080,
|
|
proxy: {
|
|
'/mobile': {
|
|
// 匹配所有以 /mobile 开头的请求路径
|
|
target: 'https://mall.gpxscs.cn', // 目标服务器
|
|
changeOrigin: true, // 是否改变请求源
|
|
pathRewrite: {
|
|
'^/mobile': '/mobile',
|
|
},
|
|
},
|
|
'/api/admin': {
|
|
// 匹配所有以 /api 开头的请求路径
|
|
target: 'https://mall.gpxscs.cn', // 目标服务器
|
|
changeOrigin: true, // 是否改变请求源
|
|
pathRewrite: {
|
|
'^/api/admin': '/api/admin',
|
|
},
|
|
},
|
|
'/api/mobile': {
|
|
// 匹配所有以 /api/mobile 开头的请求路径
|
|
target: 'https://mall.gpxscs.cn', // 目标服务器
|
|
changeOrigin: true, // 是否改变请求源
|
|
logLevel: 'debug',
|
|
pathRewrite: {
|
|
'^/api/mobile': '/api/mobile',
|
|
},
|
|
},
|
|
// '/signed':{
|
|
// target:"https://mall.gpxscs.cn",
|
|
// changeOrigin:true,
|
|
// pathRewrite:{
|
|
// }
|
|
// },
|
|
},
|
|
},
|
|
};
|