diff options
Diffstat (limited to 'searx/botdetection/http_accept.py')
| -rw-r--r-- | searx/botdetection/http_accept.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/botdetection/http_accept.py b/searx/botdetection/http_accept.py index 1ab7cb4c1..23670a283 100644 --- a/searx/botdetection/http_accept.py +++ b/searx/botdetection/http_accept.py @@ -13,12 +13,15 @@ Accept_ header .. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept """ +# pylint: disable=unused-argument from typing import Optional, Tuple import flask +from searx.tools import config -def filter_request(request: flask.Request) -> Optional[Tuple[int, str]]: + +def filter_request(request: flask.Request, cfg: config.Config) -> Optional[Tuple[int, str]]: if 'text/html' not in request.accept_mimetypes: return 429, "bot detected, HTTP header Accept did not contain text/html" return None |