diff options
author | Luke Wendling <luke@lukewendling.com> | 2013-05-25 12:41:51 -0500 |
---|---|---|
committer | Luke Wendling <luke@lukewendling.com> | 2013-05-25 12:41:51 -0500 |
commit | ff4730d7dea2220d2ba1e12f13c70416acac4042 (patch) | |
tree | c26697d0ad5f12b54a74e5bc5cb06c88267cafed /railties/lib | |
parent | ab28bafc9f1118652f5090fa1260923118930518 (diff) | |
download | rails-ff4730d7dea2220d2ba1e12f13c70416acac4042.tar.gz rails-ff4730d7dea2220d2ba1e12f13c70416acac4042.tar.bz2 rails-ff4730d7dea2220d2ba1e12f13c70416acac4042.zip |
add notice to server boot messages if using default 0.0.0.0 binding
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index e3119ecf22..87d6505ed5 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -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] |