forked from Icycoide/searxng
remove self info answers from pages after first one
This commit is contained in:
parent
b72aec0a9b
commit
aa227180e2
2 changed files with 22 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue