dmpayton / django-admin-honeypot

:honey_pot: A fake Django admin login screen page.
http://django-admin-honeypot.readthedocs.io/
MIT License
1.03k stars 188 forks source link

Fix IP identification when behind load balancer or proxy #80

Closed benjo456 closed 3 years ago

benjo456 commented 3 years ago

Currently the user IP address cannot be collected properly if the site is behind a load balancer or proxy. This code adds a fallback in those situations so that the user IP can be collected properly.

Without this, it is impossible to correctly identify a user IP and so there is no way to ban any malicious users.