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
yyq
2018-05-29 15:32:38 +0800
Commit
01bba5448c0e5e06182cfedfc04dd2cdb44a48e3
2 parents
fa1a89e5
4675f56a
Merge branch 'feature/limitLog' into release/0529
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
doraemon/middleware/limiter/index.js
doraemon/middleware/limiter/index.js
View file @
01bba54
...
...
@@ -123,6 +123,8 @@ module.exports = (req, res, next) => {
if
(
exclusion
)
{
return
next
();
}
else
if
(
!
allPass
&&
policy
)
{
logger
.
info
(
`
limit
remote
ip
:
$
{
remoteIp
};
ua
:
$
{
req
.
header
(
'User-Agent'
)};
uid
:
$
{
req
.
user
.
uid
}
`
);
policy
(
req
,
res
,
next
);
}
else
{
return
next
();
...
...
Please
register
or
login
to post a comment