Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Allow to define the IP on which server:start should listen to #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

tucksaun
Copy link
Member

This PR introduces two additional flags to the server:start command: listen-ip allows to define precisely the IP one wants to use and defaults to “127.0.0.1”, and allow-all-ip allows to enable listening on all interfaces (the behavior before #494 gets merged).

In addition to the flags, one can also use the SYMFONY_LISTEN_IP and SYMFONY_ALL_IP environment variables.

I didn’t go the “listen address” path because it would break the port flag and the preferred port logic but can move towards this later one with some BC layer.

Refs #494
Fix #523, fix #524

In addition to the flags, one can also uses the SYMFONY_LISTEN_IP and SYMFONY_ALL_IP environment variables
@tucksaun tucksaun requested a review from fabpot October 11, 2024 10:10
@fabpot
Copy link
Contributor

fabpot commented Oct 11, 2024

Looks good to me, thank you @tucksaun

@fabpot fabpot merged commit 12013a9 into symfony-cli:main Oct 11, 2024
1 check passed
@scadergit
Copy link

Working great, thanks for the quick update.

@tucksaun tucksaun deleted the feat/listen-all-ip branch October 14, 2024 09:13
@IndraGunawan
Copy link

hi @tucksaun , thanks for this PR.

i have a question, is there a way to set this config as default? so I don't need to add --allow-all-ip every time I do symfony serve -d

@tucksaun
Copy link
Member Author

hi @tucksaun , thanks for this PR.

i have a question, is there a way to set this config as default? so I don't need to add --allow-all-ip every time I do symfony serve -d

No config files to do this at the moment. But you can add SYMFONY_ALLOW_ALL_IP=trur to your environment to achieve this (see the change in the Dockerfile that does it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.