Merge pull request #10755 from lukewendling/master

Add notice on server boot if binding to 0.0.0.0
This commit is contained in:
Rafael Mendonça França 2013-05-28 07:39:48 -07:00
commit e10262962b
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ module Rails
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]