Skip to content

Bind the development web port to localhost by default#31

Open
Torchbearer127 wants to merge 1 commit into
nickjj:mainfrom
Torchbearer127:safer-dev-debug-bind
Open

Bind the development web port to localhost by default#31
Torchbearer127 wants to merge 1 commit into
nickjj:mainfrom
Torchbearer127:safer-dev-debug-bind

Conversation

@Torchbearer127
Copy link
Copy Markdown

Summary

This PR makes the example development configuration bind the web port to localhost by default:

export DOCKER_WEB_PORT_FORWARD=127.0.0.1:8000

It also adds a short note in .env.example and the README explaining that Flask / Werkzeug debug tooling should not be exposed to untrusted networks.

Why

The example .env enables FLASK_DEBUG=true for local development. Before this change, copying .env.example and running the app published the web service on all host interfaces with DOCKER_WEB_PORT_FORWARD=8000.

Binding to 127.0.0.1 preserves the normal local browser workflow while reducing the chance that development-only debug tooling is reachable from a LAN, VM interface, or public dev host by accident.

Closes #30.

Verification

  • bash -n .env.example
  • docker compose --env-file .env.example config --services

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.

Bind the example app to localhost by default when debug mode is enabled

1 participant