Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58192e1

Browse files
committed
[WebServerBundle] display the local host ip when binding to 0.0.0.0
1 parent 31836ed commit 58192e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/WebServerBundle/WebServerConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(string $documentRoot, string $env, string $address =
5555
} elseif (false !== $pos = strrpos($address, ':')) {
5656
$this->hostname = substr($address, 0, $pos);
5757
if ('*' === $this->hostname) {
58-
$this->hostname = '0.0.0.0';
58+
$this->hostname = gethostbyname(gethostname());
5959
}
6060
$this->port = substr($address, $pos + 1);
6161
} elseif (ctype_digit($address)) {

0 commit comments

Comments
 (0)