SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] check secret_key when searx.webapp is imported
Alexandre Flament568b9465e948
diff --git a/searx/__init__.py b/searx/__init__.pyindex 9bbc7c8c3..08e67f69d 100644--- a/searx/__init__.py+++ b/searx/__init__.py@@ -60,7 +60,3 @@ if 'SEARX_SECRET' in environ:settings['server']['secret_key'] = environ['SEARX_SECRET']if 'SEARX_BIND_ADDRESS' in environ:settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS']--if not searx_debug and settings['server']['secret_key'] == 'ultrasecretkey':- logger.error('server.secret_key is not changed. Please use something else instead of ultrasecretkey.')- exit(1)diff --git a/searx/webapp.py b/searx/webapp.pyindex 5076355d0..49750d210 100755--- a/searx/webapp.py+++ b/searx/webapp.py@@ -86,6 +86,11 @@ from searx.metrology.error_recorder import errors_per_enginesfrom werkzeug.serving import WSGIRequestHandlerWSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server'].get('http_protocol_version', '1.0'))+# check secret_key+if not searx_debug and settings['server']['secret_key'] == 'ultrasecretkey':+ logger.error('server.secret_key is not changed. Please use something else instead of ultrasecretkey.')+ exit(1)+# about staticstatic_path = get_resources_directory(searx_dir, 'static', settings['ui']['static_path'])logger.debug('static directory is %s', static_path)diff --git a/utils/standalone_searx.py b/utils/standalone_searx.pyindex c52035fb9..89023f41b 100755--- a/utils/standalone_searx.py+++ b/utils/standalone_searx.py@@ -15,7 +15,7 @@ Example to use this script:.. code:: bash- $ SEARX_DEBUG=1 python3 utils/standalone_searx.py rain+ $ python3 utils/standalone_searx.py rainExample to run it from python: