Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 17, 2026
commit 1acb82f8d736b541a04e267f0bc15bcc542ed2b4
3 changes: 1 addition & 2 deletions debug_toolbar/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def show_toolbar_with_docker(request: HttpRequest) -> bool:
# This is not guaranteed to work.
docker_ip = (
# Convert the last segment of the IP address to be .1
".".join(socket.gethostbyname(host).rsplit(".")[:-1])
+ ".1"
".".join(socket.gethostbyname(host).rsplit(".")[:-1]) + ".1"
)
if request.META.get("REMOTE_ADDR") == docker_ip:
return True
Expand Down