Skip to content

Commit a72fb96

Browse files
Update web preview docs to use 127.0.0.1 instead of 0.0.0.0 (#1178)
Updates the web preview documentation to use `127.0.0.1` (localhost) instead of `0.0.0.0` for the host binding. ## Changes Made - Updated configuration section to recommend `127.0.0.1` as the appropriate host - Changed Django example from `0.0.0.0:8000` to `127.0.0.1:3000` - Updated Rails example from `-b 0.0.0.0` to `-b 127.0.0.1 -p 3000` - Maintains the port 3000 requirement as specified in the warning section This change ensures users bind their development servers to localhost rather than all interfaces, which is more secure and appropriate for local development. --- [💻 View my work](https://codegen.com/agent/trace/61566) • [🚫 Ban all checks](https://codegen.com/agent/trace/61566/ban) • 👤 Initiated by @kopekC • 💬 Initiated in [#agi-test](https://thecodegen.slack.com/archives/C08DPPSL1CG/p1753463343125049?thread_ts=1753463343.125049&cid=C08DPPSL1CG) • [About Codegen](https://codegen.com) Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
1 parent 3c14f40 commit a72fb96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/sandboxes/web-preview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A "View Web Preview" button appears on the agent trace page once the server star
2323

2424
You configure Web Preview commands in a manner similar to Setup Commands, likely within the same repository settings area (e.g., `https://codegen.com/{your_org}/{repo_name}/settings/web-preview`).
2525

26-
You'll provide the command(s) necessary to start your development server. Ensure that your server is configured to listen on an appropriate host (often `0.0.0.0`) and a predictable port that Codegen can then expose.
26+
You'll provide the command(s) necessary to start your development server. Ensure that your server is configured to listen on an appropriate host (often `127.0.0.1`) and a predictable port that Codegen can then expose.
2727

2828
<Warning>
2929
The web server started for Web Preview **MUST** listen on port 3000. Codegen
@@ -42,12 +42,12 @@ npm run dev
4242

4343
```bash
4444
# For a Python/Django project
45-
python manage.py runserver 0.0.0.0:8000
45+
python manage.py runserver 127.0.0.1:3000
4646
```
4747

4848
```bash
4949
# For a Ruby on Rails project
50-
bundle exec rails server -b 0.0.0.0
50+
bundle exec rails server -b 127.0.0.1 -p 3000
5151
```
5252

5353
<Tip>

0 commit comments

Comments
 (0)