Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] is_werkzeug_reload_active is not realted to python -m

Markus Heiser33729439c5f1
diff --git a/searx/webapp.py b/searx/webapp.py
index 4ecaab7d2..3b4cf1604 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1373,6 +1373,10 @@ def is_werkzeug_reload_active() -> bool:
https://werkzeug.palletsprojects.com/en/stable/serving/#werkzeug.serving.run_simple
"""
+ if "uwsgi" in sys.argv:
+ # server was launched by uWSGI
+ return False
+
# https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941
# https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468