Closed
Description
It seems like the snippet of code in the documentation for using Docker has stopped working.

That snippet of code will set INTERNAL_IPS
to ['172.27.0.1', '127.0.0.1', '10.0.2.2']
, however, inside debug_toolbar.middleware.show_toolbar()
, request.META.get("REMOTE_ADDR")
returns '192.168.65.1'
, which is why it ends up not showing the Debug Toolbar.
This snippet of code used to work. I'm guessing something must of changed in a recent version of Docker to cause it to not get the correct IP address. I'm not sure at this point how to get the IP dynamically because even ifconfig
shows the 172.27.01
IP address instead of the 192.168.65.1
IP address.
Versions:
- Docker version 24.0.6
- Docker Compose version v2.22.0-desktop.2
- macOS Sonoma version 14.0
- django-debug-toolba v3.8.1
- django v4.2.5
Metadata
Metadata
Assignees
Labels
No labels