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.

[enh] valid json content type

asciimoo52516dab9714
diff --git a/searx/webapp.py b/searx/webapp.py
index b64d6a466..f16f602b3 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -82,7 +82,7 @@ def index():
results = search(query, request, selected_categories)
if request_data.get('format') == 'json':
# TODO HTTP headers
- return json.dumps({'query': query, 'results': results})
+ return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')
template = render('results.html'
,results=results
,q=query.decode('utf-8')