Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
周少峰
7 years ago
Commit
7e3f191cbda5bd6aa6a51de7cdde794544cce692
2 parents
79bc9ca7
e08f76ce
Merge branch 'hotfix/pass-ip' into gray
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
.gitignore
apps/passport/controllers/img-captcha.js
.gitignore
View file @
7e3f191
...
...
@@ -150,4 +150,6 @@ library
### foreman ###
Procfile
.env
.package-lock
yarn.lock
package-json.lock
...
...
apps/passport/controllers/img-captcha.js
View file @
7e3f191
...
...
@@ -49,7 +49,15 @@ const generate = (req, res, next) => {
res
.
type
(
'png'
);
if
(
result
.
code
===
200
)
{
request
(
result
.
data
.
url
).
pipe
(
res
);
request
({
url
:
result
.
data
.
url
,
headers
:
{
'X-request-ID'
:
req
.
reqID
||
''
,
'X-YOHO-IP'
:
req
.
yoho
.
clientIp
||
''
,
'X-Forwarded-For'
:
req
.
yoho
.
clientIp
||
''
,
'User-Agent'
:
'yoho/nodejs'
}
}).
pipe
(
res
);
}
}).
catch
(
next
);
...
...
Please
register
or
login
to post a comment