Showing
1 changed file
with
1 additions
and
1 deletions
@@ -57,7 +57,7 @@ module.exports = function(proxyRoute) { | @@ -57,7 +57,7 @@ module.exports = function(proxyRoute) { | ||
57 | logger.log('info','grayroute: request options: %j',options,{}); | 57 | logger.log('info','grayroute: request options: %j',options,{}); |
58 | 58 | ||
59 | //发起代理请求 | 59 | //发起代理请求 |
60 | - if(req.headers['accept'].indexOf('text/html')>-1) { | 60 | + if(req.headers['accept'].indexOf('text/html')>-1||req.xhr) { |
61 | request(options,function(err,res,body) { | 61 | request(options,function(err,res,body) { |
62 | if(err) { | 62 | if(err) { |
63 | logger.log('error','grayroute: request error:',err); | 63 | logger.log('error','grayroute: request error:',err); |
-
Please register or login to post a comment