[minor] fix ip restrictions to use forwarded for header as well
This commit is contained in:
parent
26d4af38b5
commit
2f52fe974b
1 changed files with 1 additions and 1 deletions
|
|
@ -171,7 +171,7 @@ class LoginManager:
|
|||
ip_list = [i.strip() for i in ip_list]
|
||||
|
||||
for ip in ip_list:
|
||||
if webnotes.get_request_header('REMOTE_ADDR', '').startswith(ip):
|
||||
if webnotes.get_request_header('REMOTE_ADDR', '').startswith(ip) or webnotes.get_request_header('HTTP_X_FORWARDED_FOR', '').startswith(ip):
|
||||
return
|
||||
|
||||
webnotes.msgprint('Not allowed from this IP Address')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue