diff --git a/docs/configuration-reference.md b/docs/configuration-reference.md index 3312c49a..4a50ee2c 100644 --- a/docs/configuration-reference.md +++ b/docs/configuration-reference.md @@ -12,7 +12,7 @@ Documentation of available configuration parameters. See also symfony [bundle co swoole: http_server: port: 9501 - host: localhost + host: 0.0.0.0 running_mode: process socket_type: tcp ssl_enabled: false diff --git a/src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php b/src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php index f342474c..94bd7a79 100644 --- a/src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php +++ b/src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php @@ -40,7 +40,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->children() ->scalarNode('host') ->cannotBeEmpty() - ->defaultValue('127.0.0.1') + ->defaultValue('0.0.0.0') ->end() ->scalarNode('port') ->cannotBeEmpty() diff --git a/src/Server/Config/Socket.php b/src/Server/Config/Socket.php index 227726e5..82d3eb93 100644 --- a/src/Server/Config/Socket.php +++ b/src/Server/Config/Socket.php @@ -47,7 +47,7 @@ final class Socket * * @throws \Assert\AssertionFailedException */ - public function __construct(string $host = 'localhost', int $port = 9501, string $type = 'tcp', bool $ssl = false) + public function __construct(string $host = '0.0.0.0', int $port = 9501, string $type = 'tcp', bool $ssl = false) { $this->setHost($host); $this->setPort($port); diff --git a/tests/Fixtures/Symfony/app/config/swoole.yaml b/tests/Fixtures/Symfony/app/config/swoole.yaml index d0611496..06e4422b 100644 --- a/tests/Fixtures/Symfony/app/config/swoole.yaml +++ b/tests/Fixtures/Symfony/app/config/swoole.yaml @@ -1,6 +1,6 @@ parameters: env(PORT): 9501 - env(HOST): localhost + env(HOST): 0.0.0.0 env(TRUSTED_HOSTS): localhost,127.0.0.1 env(TRUSTED_PROXIES): '*,196.168.0.0/16'