summary refs log tree commit
path: root/lib/rack/handler/fastcgi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rack/handler/fastcgi.rb')
-rw-r--r--lib/rack/handler/fastcgi.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rack/handler/fastcgi.rb b/lib/rack/handler/fastcgi.rb
index 340e3613..b26fabc3 100644
--- a/lib/rack/handler/fastcgi.rb
+++ b/lib/rack/handler/fastcgi.rb
@@ -30,8 +30,11 @@ module Rack
       end
 
       def self.valid_options
+        environment  = ENV['RACK_ENV'] || 'development'
+        default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
+
         {
-          "Host=HOST" => "Hostname to listen on (default: localhost)",
+          "Host=HOST" => "Hostname to listen on (default: #{default_host})",
           "Port=PORT" => "Port to listen on (default: 8080)",
           "File=PATH" => "Creates a Domain socket at PATH instead of a TCP socket. Ignores Host and Port if set.",
         }