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

Commit 9bcb852

Browse filesBrowse 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
Copy full SHA for 9bcb852

File tree

2 files changed

+8
-0
lines changed
Filter options

2 files changed

+8
-0
lines changed

‎src/Symfony/Bundle/WebServerBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/CHANGELOG.md
+5Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/WebServerConfig.php
+3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.