Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rails::Server outputs 'http://' even when running over SSL #408

Merged
merged 1 commit into from

2 participants

@etdsoft

Take into account the Rack::Server :SSLEnable option when building the application's URL.

This pull request refers to issue #335

@josevalim josevalim merged commit 4c755f9 into rails:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 6, 2011
  1. Take into account the Rack::Server :SSLEnable option when building th…

    Daniel Martin authored
    …e application's URL
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  railties/lib/rails/commands/server.rb
View
3  railties/lib/rails/commands/server.rb
@@ -55,8 +55,9 @@ def set_environment
end
def start
+ url = "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}"
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
- puts "=> Rails #{Rails.version} application starting in #{Rails.env} on http://#{options[:Host]}:#{options[:Port]}"
+ puts "=> Rails #{Rails.version} application starting in #{Rails.env} on #{url}"
puts "=> Call with -d to detach" unless options[:daemonize]
trap(:INT) { exit }
puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
Something went wrong with that request. Please try again.