summaryrefslogtreecommitdiff
path: root/searx/plugins
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-06-09 17:01:59 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-06-09 17:18:44 +0200
commit2c6531b2330a5c8ca986379dbad8812a6c6d3e49 (patch)
tree479755fab6b8eda840f55e9b0bb6aabc1256176d /searx/plugins
parent785f0938fdc6c0b587d5f416f005ab5046260ba6 (diff)
downloadsearxng-2c6531b2330a5c8ca986379dbad8812a6c6d3e49.tar.gz
searxng-2c6531b2330a5c8ca986379dbad8812a6c6d3e49.zip
[enh] add routing directions to osm search - closes #254
Diffstat (limited to 'searx/plugins')
-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