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
cc62c6e85536422ba72844a6244f5e7937c1bfaa
2 parents
047909dd
cef1e8bc
Merge branch 'hotfix/limiter'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
apps/3party/controllers/robot-check.js
config/common.js
apps/3party/controllers/robot-check.js
View file @
cc62c6e
...
...
@@ -2,7 +2,7 @@
const
robotCheckService
=
require
(
'../models/robot-check-service'
);
const
captchaService
=
require
(
'../../passport/controllers/captcha'
);
const
logger
=
global
.
yoho
.
logger
;
const
index
=
(
req
,
res
,
next
)
=>
{
let
channel
=
req
.
yoho
.
channel
||
'boys'
;
...
...
@@ -27,6 +27,7 @@ const isHuman = (req, res) => {
remoteIp
=
arr
[
0
];
}
logger
.
info
(
'isHuman'
,
remoteIp
);
robotCheckService
.
removeBlack
(
remoteIp
).
then
(()
=>
{
return
res
.
json
({
code
:
200
...
...
config/common.js
View file @
cc62c6e
...
...
@@ -172,7 +172,7 @@ module.exports = {
},
REQUEST_LIMIT
:
{
// 10s 最多访问5次
10
:
8
,
10
:
10
,
// 30s 最多访问15次
30
:
20
,
...
...
Please
register
or
login
to post a comment