8000 Allow * to bind all interfaces (as INADDR_ANY) · simshaun/symfony@b31ebae · GitHub
[go: up one dir, main page]

Skip to content

Commit b31ebae

Browse files
author
Julien Pauli
committed
Allow * to bind all interfaces (as INADDR_ANY)
1 parent e891d55 commit b31ebae

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