mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
Merge pull request #1702 from tiekoetter/limiter-accept-encoding-handling
[mod] limiter plugin: Accept-Encoding handling
This commit is contained in:
commit
5284de9137
@ -67,7 +67,7 @@ def is_accepted_request() -> bool:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
accept_encoding_list = [l.strip() for l in request.headers.get('Accept-Encoding', '').split(',')]
|
accept_encoding_list = [l.strip() for l in request.headers.get('Accept-Encoding', '').split(',')]
|
||||||
if 'gzip' not in accept_encoding_list or 'deflate' not in accept_encoding_list:
|
if 'gzip' not in accept_encoding_list and 'deflate' not in accept_encoding_list:
|
||||||
logger.debug("suspicious Accept-Encoding") # pylint: disable=undefined-variable
|
logger.debug("suspicious Accept-Encoding") # pylint: disable=undefined-variable
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user