Code Monkey home page Code Monkey logo

Comments (4)

alstr avatar alstr commented on June 28, 2024

Having done some further research, it seems like it is potentially retrieving the IP address of the load balancer. The actual IP seems to be in HTTP_X_FORWARDED_FOR rather than REMOTE_ADDR.

from django-admin-honeypot.

dmpayton avatar dmpayton commented on June 28, 2024

@alstr Hello! You'll need a middleware to assign the IP address. There's an example in the docs:

https://django-admin-honeypot.readthedocs.io/en/latest/manual/faq.html#why-is-the-ip-address-logged-as-127-0-0-1

from django-admin-honeypot.

alstr avatar alstr commented on June 28, 2024

Ah yes, that should sort it. Thanks!

from django-admin-honeypot.

rainer85ah avatar rainer85ah commented on June 28, 2024

Hi Derek,

thanks for your work and time.

I was wondering if you can share a full example of this code and what I mean by that is to what exactly do we have to set in the middlewares section in settings?
Does this class (class RemoteAddrMiddleware(object)) have to be in views.py file or somewhere else?

Thanks,
Rainer

from django-admin-honeypot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.