Skip to content

FIX Default backend to localhost instead of 0.0.0.0#1612

Merged
adrian-gavrila merged 1 commit intomicrosoft:mainfrom
adrian-gavrila:adrian-gavrila/gui_localhost_default
Apr 14, 2026
Merged

FIX Default backend to localhost instead of 0.0.0.0#1612
adrian-gavrila merged 1 commit intomicrosoft:mainfrom
adrian-gavrila:adrian-gavrila/gui_localhost_default

Conversation

@adrian-gavrila
Copy link
Copy Markdown
Contributor

Description

The backend defaults to host="0.0.0.0". This changes the default to localhost so the server is only reachable from the local machine by default.

  • Default --host changed to localhost in pyrit_backend CLI and frontend/dev.py
  • Docker port mapping bound to 127.0.0.1 in run_pyrit_docker.py
  • Users can still opt in to network exposure with --host 0.0.0.0 (non-Docker) or docker run -p 0.0.0.0:8000:8000 (Docker)

Tests and Documentation

  • Updated unit test assertion in test_pyrit_backend.py to match new default
  • Updated pyrit/backend/README.md default
  • No JupyText changes needed (no notebook changes)

- Change pyrit_backend CLI default host from 0.0.0.0 to localhost
- Bind Docker port mapping to 127.0.0.1 in run_pyrit_docker.py
- Update frontend dev.py to use localhost
- Add browser-friendly URL hint when host is 0.0.0.0
- Update backend README default
- Users can still opt in to network exposure with --host 0.0.0.0

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adrian-gavrila adrian-gavrila merged commit 917ec40 into microsoft:main Apr 14, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants