Skip to content

Commit abd3506

Browse files
authored
Added SERVER_HOST environment variable to the serve command host option (#41831)
1 parent 29204f7 commit abd3506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Foundation/Console/ServeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ protected function canTryAnotherPort()
211211
protected function getOptions()
212212
{
213213
return [
214-
['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on', '127.0.0.1'],
214+
['host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on', Env::get('SERVER_HOST', '127.0.0.1')],
215215
['port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on', Env::get('SERVER_PORT')],
216216
['tries', null, InputOption::VALUE_OPTIONAL, 'The max number of ports to attempt to serve from', 10],
217217
['no-reload', null, InputOption::VALUE_NONE, 'Do not reload the development server on .env file changes'],

0 commit comments

Comments
 (0)