...
|
...
|
@@ -26,6 +26,7 @@ module.exports=function(controllers){ |
|
|
useQuerystring:true,
|
|
|
form:req.body
|
|
|
}
|
|
|
|
|
|
//删除提交内容长度,代理会改变长度
|
|
|
delete options.headers['content-length'];
|
|
|
delete options.headers["accept-encoding"];
|
...
|
...
|
@@ -41,8 +42,8 @@ module.exports=function(controllers){ |
|
|
options.formData = addFiles(req);
|
|
|
delete options.form;
|
|
|
}
|
|
|
// console.log('info','grayroute: request options: %j',options,{});
|
|
|
|
|
|
console.log('info','grayroute: request options: %j',options,{});
|
|
|
console.log("代理:",options);
|
|
|
//发起代理请求
|
|
|
request(options).pipe(res);
|
|
|
}else{
|
...
|
...
|
@@ -54,7 +55,7 @@ module.exports=function(controllers){ |
|
|
}
|
|
|
},function(err,res,body){
|
|
|
var code = res?res.statusCode:'no response';
|
|
|
// console.log('info','grayroute: session keep status:'+code);
|
|
|
console.log('info','grayroute: session keep status:'+code);
|
|
|
});
|
|
|
next();
|
|
|
}
|
...
|
...
|
|