2020-01-09 16:25:05 +01:00
|
|
|
[{
|
|
|
|
"name":"search request",
|
|
|
|
"filters":[
|
|
|
|
"Param:q",
|
|
|
|
"Path=^(/|/search)$"
|
|
|
|
],
|
|
|
|
"interval":60,
|
|
|
|
"limit":15,
|
|
|
|
"subrules":[
|
2020-01-08 19:21:07 +01:00
|
|
|
{
|
2020-01-09 16:25:05 +01:00
|
|
|
"name":"roboagent limit",
|
|
|
|
"interval":60,
|
|
|
|
"limit":15,
|
|
|
|
"filters":[
|
|
|
|
"Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
|
|
|
|
],
|
|
|
|
"actions":[
|
|
|
|
{"name": "log"},
|
|
|
|
{
|
|
|
|
"name":"block",
|
|
|
|
"params":{
|
|
|
|
"message":"Rate limit exceeded"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-01-08 19:21:07 +01:00
|
|
|
},
|
|
|
|
{
|
2020-01-09 16:25:05 +01:00
|
|
|
"name":"botlimit",
|
|
|
|
"limit":0,
|
|
|
|
"stop":true,
|
|
|
|
"filters":[
|
|
|
|
"Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
|
|
|
|
],
|
|
|
|
"actions":[
|
|
|
|
{"name": "log"},
|
|
|
|
{
|
|
|
|
"name":"block",
|
|
|
|
"params":{
|
|
|
|
"message":"Rate limit exceeded"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-01-08 19:21:07 +01:00
|
|
|
},
|
|
|
|
{
|
2020-01-09 16:25:05 +01:00
|
|
|
"name":"IP limit",
|
|
|
|
"interval":60,
|
|
|
|
"limit":15,
|
|
|
|
"stop":true,
|
|
|
|
"aggregations":[
|
|
|
|
"Header:X-Forwarded-For"
|
|
|
|
],
|
|
|
|
"actions":[
|
|
|
|
{"name": "log"},
|
|
|
|
{
|
|
|
|
"name":"block",
|
|
|
|
"params":{
|
|
|
|
"message":"Rate limit exceeded"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name":"rss/json limit",
|
|
|
|
"interval":60,
|
|
|
|
"limit":15,
|
|
|
|
"stop":true,
|
|
|
|
"filters":[
|
|
|
|
"Param:format=(csv|json|rss)"
|
|
|
|
],
|
|
|
|
"actions":[
|
|
|
|
{"name": "log"},
|
|
|
|
{
|
|
|
|
"name":"block",
|
|
|
|
"params":{
|
|
|
|
"message":"Rate limit exceeded"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name":"useragent limit",
|
|
|
|
"interval":60,
|
|
|
|
"limit":15,
|
|
|
|
"aggregations":[
|
|
|
|
"Header:User-Agent"
|
|
|
|
],
|
|
|
|
"actions":[
|
|
|
|
{"name": "log"},
|
|
|
|
{
|
|
|
|
"name":"block",
|
|
|
|
"params":{
|
|
|
|
"message":"Rate limit exceeded"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-01-08 19:21:07 +01:00
|
|
|
}
|
2020-01-09 16:25:05 +01:00
|
|
|
]
|
|
|
|
}]
|