Permalink
Browse files

add notice to server boot messages if using default 0.0.0.0 binding

  • Loading branch information...
1 parent ab28baf commit ff4730d7dea2220d2ba1e12f13c70416acac4042 @lukewendling lukewendling committed May 25, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 railties/lib/rails/commands/server.rb
@@ -63,6 +63,9 @@ def start
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
puts "=> Rails #{Rails.version} application starting in #{Rails.env} on #{url}"
puts "=> Run `rails server -h` for more startup options"
+ if options[:Host].to_s.match(/0\.0\.0\.0/)
+ puts "=> Notice: server is listening on all interfaces (#{options[:Host]}). Consider using 127.0.0.1 (--binding option)"
+ end
trap(:INT) { exit }
puts "=> Ctrl-C to shutdown server" unless options[:daemonize]

0 comments on commit ff4730d

Please sign in to comment.