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

ipware? #78

Closed joetheone closed 2 years ago

joetheone commented 3 years ago

Hi all,

I find it kind of crazy that this library has no built in way to pull IP addresses from anything other than REMOTE_ADDR. On AWS, this is always the IP of my load balancer and it makes it completely useless.

I know I can add a middleware, but why can't we be better than this? django-axes (https://github.com/jazzband/django-axes) handles this really nicely by using django-ipware(https://github.com/un33k/django-ipware) to get the IP and allowing us to configure the ipware precedence order: https://django-axes.readthedocs.io/en/latest/4_configuration.html#configuring-reverse-proxies

Can we do something similar here?

9mido commented 3 years ago

Linking a related PRs:

79, #81

blag commented 3 years ago

Hi, I have forked this project, merged a few PRs (including one that utilizes django-ipware to solve this exact issue), and released a package to PyPI. You might have better luck with my fork.

dmpayton commented 2 years ago

django-ipware integration has been merged into develop. 👍🏻