mirror of
https://github.com/searxng/searxng-docker.git
synced 2025-12-23 04:00:02 +00:00
Merge pull request #32 from unixfox/patch-2
remove blocking when brotli is not supported and add blocking when gzip and deflate aren't supported
This commit is contained in:
14
rules.json
14
rules.json
@@ -71,8 +71,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "block no brotli support",
|
"name": "block no gzip support",
|
||||||
"filters": ["!Header:Accept-Encoding=[; ]?br[; ]?"],
|
"filters": ["!Header:Accept-Encoding=(^gzip$|^gzip[;,]|[; ]gzip$|[; ]gzip[;,])"],
|
||||||
|
"limit": 0,
|
||||||
|
"stop": true,
|
||||||
|
"actions": [
|
||||||
|
{"name": "block",
|
||||||
|
"params": {"message": "Rate limit exceeded"}}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "block no deflate support",
|
||||||
|
"filters": ["!Header:Accept-Encoding=(^deflate$|^deflate[;,]|[; ]deflate$|[; ]deflate[;,])"],
|
||||||
"limit": 0,
|
"limit": 0,
|
||||||
"stop": true,
|
"stop": true,
|
||||||
"actions": [
|
"actions": [
|
||||||
|
|||||||
Reference in New Issue
Block a user