Authored by weiqingting

代理

... ... @@ -26,6 +26,7 @@ module.exports=function(controllers){
useQuerystring:true,
form:req.body
}
//删除提交内容长度,代理会改变长度
delete options.headers['content-length'];
delete options.headers["accept-encoding"];
... ... @@ -42,7 +43,7 @@ module.exports=function(controllers){
delete options.form;
}
// console.log('info','grayroute: request options: %j',options,{});
console.log("代理:",options);
//发起代理请求
request(options).pipe(res);
}else{
... ...