以下两种都能满足要求
"h5" : {
"devServer" : {
"https" : false,
"port" : 8081,//见备注1
"disableHostCheck" : true,
"proxy" : {
"/" : {
"target" : "http://xxx.xxx.xxx.xxx:pppp",
"changeOrigin" : true,
"secure" : false
}
}
}
}
"h5" : {
"devServer" : {
"https" : false,
"port" : 8081,//见备注1
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://xxx.xxx.xxx.xxx:pppp",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
"^/api" : "/"
}
}
}
}
}
