on master help sign in
[enh] Fix uppercase ip query (#2991)

## What does this PR do? Fixes the self_info plugin to support uppercase ip queries. ## Why is this change important? This PR solves the mild annoyance of retyping IP in lowercase. ## Related issues Closes #2888

commit8ecc8c57457d529fe424fbf9f50c2e565e78fcf1 authorFlodur871 <42621369+Flodur871@users.noreply.github.com> dateSat 2 Oct 2021, 11:35 (5 years ago) parent1d5feed
1 file changed+1−1
searx/plugins/self_info.py+1−1
searx/plugins/self_info.py+1−1
@@ -31,7 +31,7 @@ p = re.compile('.*user[ -]agent.*', re.IGNORECASE)
3131def post_search(request, search):
3232 if search.search_query.pageno > 1:
3333 return True
34− if search.search_query.query == 'ip':
34+ if search.search_query.query.lower() == 'ip':
3535 x_forwarded_for = request.headers.getlist("X-Forwarded-For")
3636 if x_forwarded_for:
3737 ip = x_forwarded_for[0]