on master help sign in
[fix] call ip plugin as a post search callback
commit54f1bc0425355b54785da6e711babb881f4dd0d5 authorAdam Tauber <asciimoo@gmail.com> dateTue 7 Apr 2015, 11:07 (12 years ago) parent52d243f
1 file changed+2−2
searx/plugins/self_ip.py+2−2
searx/plugins/self_ip.py+2−2
@@ -4,10 +4,10 @@ description = gettext('Display your source IP address if the query expression is
44default_on = True
55
66
7−# attach callback to the pre search hook
7+# attach callback to the post search hook
88# request: flask request object
99# ctx: the whole local context of the pre search hook
10−def pre_search(request, ctx):
10+def post_search(request, ctx):
1111 if ctx['search'].query == 'ip':
1212 x_forwarded_for = request.headers.getlist("X-Forwarded-For")
1313 if x_forwarded_for: