.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.botdetection.http_accept_language Namespace Reference

Functions

werkzeug.Response|None filter_request (IPv4Network|IPv6Network network, flask.Request request, config.Config cfg)
 

Detailed Description

Method ``http_accept_language``
-------------------------------

The ``http_accept_language`` method evaluates a request as the request of a bot
if the Accept-Language_ header is unset.

.. _Accept-Language:
   https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent

Function Documentation

◆ filter_request()

werkzeug.Response | None searx.botdetection.http_accept_language.filter_request ( IPv4Network | IPv6Network network,
flask.Request request,
config.Config cfg )

Definition at line 27 of file http_accept_language.py.

31) -> werkzeug.Response | None:
32 if request.headers.get('Accept-Language', '').strip() == '':
33 return too_many_requests(network, "missing HTTP header Accept-Language")
34 return None