Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
48d08c5688f259c80f41edf6ed2a9845ceecfec3
1 parent
d9f3559a
change risk router key
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
doraemon/middleware/risk-management.js
doraemon/middleware/risk-management.js
View file @
48d08c5
...
...
@@ -9,6 +9,7 @@ const cache = global.yoho.cache.master;
const
helpers
=
global
.
yoho
.
helpers
;
const
pathToRegexp
=
require
(
'path-to-regexp'
);
const
logger
=
global
.
yoho
.
logger
;
const
md5
=
require
(
'yoho-md5'
);
const
statusCode
=
{
code
:
4403
,
...
...
@@ -83,7 +84,7 @@ module.exports = () => {
return
next
();
}
let
keyPath
=
`
$
{
_
.
trim
(
path
,
'/'
).
replace
(
/
\/
/g
,
':'
)}
`
;
let
keyPath
=
md5
(
`
$
{
router
.
regRoute
}
`
)
;
let
limitKey
=
`
wap
:
risk
:
limit
:
$
{
keyPath
}
:
$
{
ip
}
`
;
let
configKey
=
`
wap
:
risk
:
$
{
keyPath
}
:
$
{
ip
}
`
;
let
checkUrl
=
helpers
.
urlFormat
(
'/3party/check'
,
{
...
...
Please
register
or
login
to post a comment