mirror of
https://github.com/searx/searx
synced 2024-11-25 19:30:01 +01:00
[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
This commit is contained in:
parent
1d5feed4c1
commit
8ecc8c5745
@ -31,7 +31,7 @@ p = re.compile('.*user[ -]agent.*', re.IGNORECASE)
|
||||
def post_search(request, search):
|
||||
if search.search_query.pageno > 1:
|
||||
return True
|
||||
if search.search_query.query == 'ip':
|
||||
if search.search_query.query.lower() == 'ip':
|
||||
x_forwarded_for = request.headers.getlist("X-Forwarded-For")
|
||||
if x_forwarded_for:
|
||||
ip = x_forwarded_for[0]
|
||||
|
Loading…
Reference in New Issue
Block a user