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
Plain Diff
Browse Files
Authored by
毕凯
7 years ago
Commit
f671ae0393a1c6c2ed7815af374595c16f39d7b4
2 parents
e15baeec
d7226f52
Merge branch 'gray'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
config/common.js
doraemon/middleware/limiter/index.js
config/common.js
View file @
f671ae0
...
...
@@ -148,17 +148,17 @@ module.exports = {
}
},
REQUEST_LIMIT
:
{
// 10s 最多访问5次
10
:
10
,
// 10s 最多访问20次
10
:
20
,
// 30s 最多访问15次
30
:
20
,
// 30s 最多访问40次
30
:
40
,
// 60s 最多访问15次
60
:
30
,
// 60s 最多访问60次
60
:
60
,
// 100s 最多访问15次
600
:
100
// 100s 最多访问200次
600
:
200
},
superCapture
:
'93c70db61fe276f93ce781ad17dc47cd'
,
from
:
from
...
...
doraemon/middleware/limiter/index.js
View file @
f671ae0
...
...
@@ -19,6 +19,7 @@ const IP_WHITE_LIST = [
'218.94.75.58'
,
'218.94.75.50'
,
'218.94.77.166'
,
'10.66.70.21'
,
// 联盟 生产 IP
'222.73.196.18'
// B站合作方单击次数快加白名单
];
...
...
@@ -30,7 +31,24 @@ const PATH_WHITE_LIST = [
'/passport/captcha/get'
,
'/passport/images'
,
'/passport/img-check.jpg'
,
'/passport/geetest/register'
'/passport/geetest/register'
,
'/activity/individuation/productLst'
,
'/activity/individuation/coupon'
,
'/activity/share'
,
'/activity/wechat/share'
,
'/activity/wechat/1111'
,
'/api/switch'
,
'/passport/login/user'
,
'/api/sw.js'
,
'/api/manifest.json'
,
'/api/activity/sw.js'
,
'/api/activity/manifest.json'
,
'/api/hfxRaNY27L.txt'
,
'/api/activity/hfxRaNY27L.txt'
,
'/api/shop/hfxRaNY27L.txt'
,
'/api/product/hfxRaNY27L.txt'
,
'/api/.well-known/apple-app-site-association'
,
'/sitemap.xml'
];
const
limiter
=
(
rule
,
policy
,
context
)
=>
{
...
...
Please
register
or
login
to post a comment