Added check_login_tries to paramecio2
This commit is contained in:
parent
f689dc5f63
commit
1ee7ebb23d
2 changed files with 50 additions and 2 deletions
|
|
@ -36,15 +36,16 @@ def check_login_tries(request, db):
|
|||
|
||||
logintries.safe_query()
|
||||
|
||||
#ip=request.environ.get('HTTP_X_FORWARDED_FOR') or request.environ.get('REMOTE_ADDR')
|
||||
|
||||
ip=request.environ.get('HTTP_X_FORWARDED_FOR') or request.environ.get('REMOTE_ADDR')
|
||||
|
||||
"""
|
||||
if 'x-real-ip' in request.headers:
|
||||
ip=request.headers['x-real-ip']
|
||||
elif 'x-forwarded-for' in request.headers:
|
||||
ip=request.headers['x-forwarded-for']
|
||||
else:
|
||||
ip=request.client.host
|
||||
"""
|
||||
|
||||
you_cannot_login=0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue