added spam removal
This commit is contained in:
@@ -4,3 +4,10 @@ def remove_common_elements(a, b):
|
||||
if e in b:
|
||||
a.remove(e)
|
||||
b.remove(e)
|
||||
|
||||
|
||||
def get_ip(request):
|
||||
if request.headers.getlist("X-Forwarded-For"):
|
||||
return request.headers.getlist("X-Forwarded-For")[0]
|
||||
else:
|
||||
return request.remote_addr
|
||||
|
||||
Reference in New Issue
Block a user