summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorNoemi Vanyi <sitbackandwait@gmail.com>2016-08-27 16:45:25 +0200
committerNoemi Vanyi <sitbackandwait@gmail.com>2016-08-27 16:45:25 +0200
commitaa227180e2e7b720d932d75d6fc86fb7417ef158 (patch)
tree3bebaad49dc974f082107db652ddb1f600e48702 /searx
parentb72aec0a9b2b548d7f6a8ddecedd58f5392b8372 (diff)
downloadsearxng-aa227180e2e7b720d932d75d6fc86fb7417ef158.tar.gz
searxng-aa227180e2e7b720d932d75d6fc86fb7417ef158.zip
remove self info answers from pages after first one
Diffstat (limited to 'searx')
-rw-r--r--searx/plugins/self_info.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
index 75cbae0de..438274c41 100644
--- a/searx/plugins/self_info.py
+++ b/searx/plugins/self_info.py
@@ -29,6 +29,8 @@ p = re.compile('.*user[ -]agent.*', re.IGNORECASE)
# request: flask request object
# ctx: the whole local context of the pre search hook
def post_search(request, ctx):
+ if ctx['search'].pageno > 1:
+ return True
if ctx['search'].query == 'ip':
x_forwarded_for = request.headers.getlist("X-Forwarded-For")
if x_forwarded_for: