10000 feature #23320 [WebServer] Allow * to bind all interfaces (as INADDR_… · symfony/symfony@9bcb852 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9bcb852

Browse files
committed
feature #23320 [WebServer] Allow * to bind all interfaces (as INADDR_ANY) (jpauli, fabpot)
This PR was merged into the 3.4 branch. Discussion ---------- [WebServer] Allow * to bind all interfaces (as INADDR_ANY) | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | no-tests | Fixed tickets | ~ | License | MIT | Doc PR | In Python and elsewhere, binding to '*' means '0.0.0.0' (INADDR_ANY). I just added that to WebServer command. Commits ------- 1880bcf fixed CS b31ebae Allow * to bind all interfaces (as INADDR_ANY)
2 parents 98be08b + 1880bcf commit 9bcb852

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
3.4.0
5+
-----
6+
7+
* WebServer can now use '*' as a wildcard to bind to 0.0.0.0 (INADDR_ANY)
8+
49
3.3.0
510
-----
611

src/Symfony/Bundle/WebServerBundle/WebServerConfig.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function __construct($documentRoot, $env, $address = null, $router = null
5454
$this->port = $this->findBestPort();
5555
} elseif (false !== $pos = strrpos($address, ':')) {
5656
$this->hostname = substr($address, 0, $pos);
57+
if ('*' === $this->hostname) {
58+
$this->hostname = '0.0.0.0';
59+
}
5760
$this->port = substr($address, $pos + 1);
5861
} elseif (ctype_digit($address)) {
5962
$this->hostname = '127.0.0.1';

0 commit comments

Comments
 (0)
0