__init__.py 724 B

123456789101112131415161718192021222324252627
  1. # SPDX-License-Identifier: AGPL-3.0-or-later
  2. # lint: pylint
  3. """.. _botdetection src:
  4. X-Forwarded-For
  5. ===============
  6. .. attention::
  7. A correct setup of the HTTP request headers ``X-Forwarded-For`` and
  8. ``X-Real-IP`` is essential to be able to assign a request to an IP correctly:
  9. - `NGINX RequestHeader`_
  10. - `Apache RequestHeader`_
  11. .. _NGINX RequestHeader:
  12. https://docs.searxng.org/admin/installation-nginx.html#nginx-s-searxng-site
  13. .. _Apache RequestHeader:
  14. https://docs.searxng.org/admin/installation-apache.html#apache-s-searxng-site
  15. .. autofunction:: searx.botdetection.get_real_ip
  16. """
  17. from ._helpers import dump_request
  18. from ._helpers import get_real_ip
  19. from ._helpers import too_many_requests