正在显示
1 个修改的文件
包含
3 行增加
和
9 行删除
@@ -69,21 +69,15 @@ exports = module.exports = function (logger, settings) { | @@ -69,21 +69,15 @@ exports = module.exports = function (logger, settings) { | ||
69 | } | 69 | } |
70 | 70 | ||
71 | function handleSuccess(data, response, req, res, next, reqOption) { | 71 | function handleSuccess(data, response, req, res, next, reqOption) { |
72 | + var options = reqOption.options || {}; | ||
73 | + logger.debug({ url: reqOption.url, method: options.method, headers: options.headers, query: options.query, data: JSON.parse(options.data), backdata: data }); | ||
72 | if (reqOption.url.indexOf(settings.proxy.authUrl) != -1) { | 74 | if (reqOption.url.indexOf(settings.proxy.authUrl) != -1) { |
73 | req.session.token = data; | 75 | req.session.token = data; |
74 | req.session.save(function (err) { | 76 | req.session.save(function (err) { |
75 | if (err) | 77 | if (err) |
76 | logger.error(err); | 78 | logger.error(err); |
77 | else { | 79 | else { |
78 | - var options = reqOption.options || {}; | ||
79 | - logger.debug({ | ||
80 | - url: reqOption.url, | ||
81 | - method: options.method, | ||
82 | - headers: options.headers, | ||
83 | - query: options.query, | ||
84 | - data: JSON.parse(options.data), | ||
85 | - backdata: data | ||
86 | - }); | 80 | + |
87 | res.send(data); | 81 | res.send(data); |
88 | } | 82 | } |
89 | }) | 83 | }) |
请
注册
或
登录
后发表评论