mirror of
https://github.com/searxng/searxng.git
synced 2024-11-17 18:00:12 +01:00
[fix] indentation of filtron's rules (json)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
dda4a46f8e
commit
6ff20cef73
@ -58,49 +58,40 @@ of:
|
|||||||
.. code:: json
|
.. code:: json
|
||||||
|
|
||||||
[
|
[
|
||||||
{ "name": "search request",
|
{
|
||||||
|
"name": "search request",
|
||||||
"filters": [
|
"filters": [
|
||||||
"Param:q",
|
"Param:q",
|
||||||
"Path=^(/|/search)$"
|
"Path=^(/|/search)$"
|
||||||
],
|
],
|
||||||
"interval": "<time-interval-in-sec (int)>",
|
"interval": "<time-interval-in-sec (int)>"
|
||||||
"limit": "<max-request-number-in-interval (int)>",
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
"subrules": [
|
"subrules": [
|
||||||
{
|
{
|
||||||
"name": "roboagent limit",
|
"name": "missing Accept-Language",
|
||||||
"interval": "<time-interval-in-sec (int)>",
|
"filters": ["!Header:Accept-Language"],
|
||||||
"limit": "<max-request-number-in-interval (int)>",
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
"filters": [
|
"stop": true,
|
||||||
"Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
|
|
||||||
],
|
|
||||||
"actions": [
|
"actions": [
|
||||||
{"name":"log"},
|
{"name":"log"},
|
||||||
{"name": "block",
|
{"name": "block",
|
||||||
"params": {
|
"params": {"message": "Rate limit exceeded"}}
|
||||||
"message": "Rate limit exceeded"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "botlimit",
|
"name": "suspiciously Connection=close header",
|
||||||
"limit": 0,
|
"filters": ["Header:Connection=close"],
|
||||||
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
"stop": true,
|
"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": [
|
"actions": [
|
||||||
{"name":"log"},
|
{"name":"log"},
|
||||||
{"name": "block",
|
{"name": "block",
|
||||||
"params": {
|
"params": {"message": "Rate limit exceeded"}}
|
||||||
"message": "Rate limit exceeded"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "IP limit",
|
"name": "IP limit",
|
||||||
"interval": "<time-interval-in-sec (int)>",
|
"interval": "<time-interval-in-sec (int)>"
|
||||||
"limit": "<max-request-number-in-interval (int)>",
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
"stop": true,
|
"stop": true,
|
||||||
"aggregations": [
|
"aggregations": [
|
||||||
@ -117,12 +108,12 @@ of:
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rss/json limit",
|
"name": "rss/json limit",
|
||||||
"interval": "<time-interval-in-sec (int)>",
|
|
||||||
"limit": "<max-request-number-in-interval (int)>",
|
|
||||||
"stop": true,
|
|
||||||
"filters": [
|
"filters": [
|
||||||
"Param:format=(csv|json|rss)"
|
"Param:format=(csv|json|rss)"
|
||||||
],
|
],
|
||||||
|
"interval": "<time-interval-in-sec (int)>"
|
||||||
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
|
"stop": true,
|
||||||
"actions": [
|
"actions": [
|
||||||
{ "name": "log"},
|
{ "name": "log"},
|
||||||
{ "name": "block",
|
{ "name": "block",
|
||||||
@ -134,7 +125,7 @@ of:
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "useragent limit",
|
"name": "useragent limit",
|
||||||
"interval": "<time-interval-in-sec (int)>",
|
"interval": "<time-interval-in-sec (int)>"
|
||||||
"limit": "<max-request-number-in-interval (int)>",
|
"limit": "<max-request-number-in-interval (int)>",
|
||||||
"aggregations": [
|
"aggregations": [
|
||||||
"Header:User-Agent"
|
"Header:User-Agent"
|
||||||
|
@ -31,7 +31,8 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ "name": "suspiciously frequent IP",
|
{
|
||||||
|
"name": "suspiciously frequent IP",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"interval": 600,
|
"interval": 600,
|
||||||
"limit": 30,
|
"limit": 30,
|
||||||
@ -42,7 +43,8 @@
|
|||||||
{"name":"log"}
|
{"name":"log"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ "name": "search request",
|
{
|
||||||
|
"name": "search request",
|
||||||
"filters": [
|
"filters": [
|
||||||
"Param:q",
|
"Param:q",
|
||||||
"Path=^(/|/search)$"
|
"Path=^(/|/search)$"
|
||||||
|
Loading…
Reference in New Issue
Block a user