Authored by weiqingting

防止重复提交

... ... @@ -58,23 +58,7 @@ module.exports = function(proxyRoute) {
delete options.form;
}
logger.log('info','grayroute: request options: %j',options,{});
//发起代理请求
if(req.headers['accept'].indexOf('text/html')>-1||req.xhr) {
request(options,function(err,res,body) {
if(err) {
logger.log('error','grayroute: request error:',err);
ress.status(500).send('');
} else if(res&&res.statusCode === 302) {
//跳转
ress.redirect(res.caseless.get('location'));
}else {
request(options).pipe(ress);
}
});
} else {
request(options).pipe(ress);//如果是静态资源,直接管道传递结果
}
request(options).pipe(ress);
} else {
//当不是老系统的URL,需要访问老系统保持session
... ...