Skip to content

Commit eca99cf

Browse files
samamorganjheld
authored andcommitted
Make REMOTE_ADDR optional
Resolves #263
1 parent 9e04815 commit eca99cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easyaudit/signals/auth_signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def user_logged_in(sender, request, user, **kwargs):
1818
'login_type': LoginEvent.LOGIN,
1919
'username': getattr(user, user.USERNAME_FIELD),
2020
'user_id': getattr(user, 'id', None),
21-
'remote_ip': request.META[REMOTE_ADDR_HEADER]
21+
'remote_ip': request.META.get(REMOTE_ADDR_HEADER, "")
2222
})
2323
except Exception:
2424
if should_propagate_exceptions():

0 commit comments

Comments
 (0)