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
[enh] optionally configurable hostname - edit settings.py
asciimoo141b04c6dde9
diff --git a/searx/settings.py b/searx/settings.pyindex 3d4e65f06..9efdc20e3 100644--- a/searx/settings.py+++ b/searx/settings.py@@ -12,3 +12,5 @@ weights = {} # 'search_engine_name': float(weight) | default is 1.0blacklist = [] # search engine blacklistcategories = {} # custom search engine categories++hostname = None # domain name or None - if you want to rewrite the default HTTP hostdiff --git a/searx/webapp.py b/searx/webapp.pyindex bbc151a5d..6ac0046f1 100644--- a/searx/webapp.py+++ b/searx/webapp.py@@ -165,7 +165,11 @@ def opensearch():method = 'get'if request.is_secure:scheme = 'https'- ret = opensearch_xml.format(method=method, host=url_for('index', _external=True, _scheme=scheme))+ if settings.hostname:+ hostname = '{0}://{1}/'.format(scheme,settings.hostname)+ else:+ hostname = url_for('index', _external=True, _scheme=scheme)+ ret = opensearch_xml.format(method=method, host=hostname)resp = Response(response=ret,status=200,mimetype="application/xml")