diff options
Diffstat (limited to 'railties/lib/rails/commands/server')
-rw-r--r-- | railties/lib/rails/commands/server/server_command.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb index 7e8c86fb49..278fe63c51 100644 --- a/railties/lib/rails/commands/server/server_command.rb +++ b/railties/lib/rails/commands/server/server_command.rb @@ -188,10 +188,12 @@ module Rails end def host - unless (default_host = options[:binding]) + if options[:binding] + options[:binding] + else default_host = environment == "development" ? "localhost" : "0.0.0.0" + ENV.fetch("HOST", default_host) end - ENV.fetch("HOST", default_host) end def environment |