Showing
1 changed file
with
9 additions
and
1 deletions
@@ -24,7 +24,15 @@ exports.imgCheck = (req, res, next) => { | @@ -24,7 +24,15 @@ exports.imgCheck = (req, res, next) => { | ||
24 | 24 | ||
25 | return req.ctx(imgCheckServiceModel).gen(udid).then(result => { | 25 | return req.ctx(imgCheckServiceModel).gen(udid).then(result => { |
26 | if (result.code === 200 && result.data) { | 26 | if (result.code === 200 && result.data) { |
27 | - return request(result.data.verifiedGraphicCode).pipe(res); // eslint-disable-line | 27 | + return request({ |
28 | + url: result.data.verifiedGraphicCode, | ||
29 | + headers: { | ||
30 | + 'X-request-ID': req.reqID || '', | ||
31 | + 'X-YOHO-IP': req.yoho.clientIp || '', | ||
32 | + 'X-Forwarded-For': req.yoho.clientIp || '', | ||
33 | + 'User-Agent': 'yoho/nodejs' | ||
34 | + } | ||
35 | + }).pipe(res); // eslint-disable-line | ||
28 | } | 36 | } |
29 | next(); | 37 | next(); |
30 | }).catch(next); | 38 | }).catch(next); |
-
Please register or login to post a comment