summaryrefslogtreecommitdiff
path: root/searx/plugins/self_info.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/plugins/self_info.py')
-rw-r--r--searx/plugins/self_info.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
index 8d6c661ad..67e5e0e53 100644
--- a/searx/plugins/self_info.py
+++ b/searx/plugins/self_info.py
@@ -37,10 +37,8 @@ def post_search(request, search):
ip = x_forwarded_for[0]
else:
ip = request.remote_addr
- search.result_container.answers.clear()
- search.result_container.answers.add(ip)
+ search.result_container.answers['ip'] = {'answer': ip}
elif p.match(search.search_query.query):
ua = request.user_agent
- search.result_container.answers.clear()
- search.result_container.answers.add(ua)
+ search.result_container.answers['user-agent'] = {'answer': ua}
return True