diff options
Diffstat (limited to 'railties/builtin')
-rw-r--r-- | railties/builtin/rails_info/rails/info_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/builtin/rails_info/rails/info_controller.rb b/railties/builtin/rails_info/rails/info_controller.rb index 47e87c5bf5..196eeb4a6c 100644 --- a/railties/builtin/rails_info/rails/info_controller.rb +++ b/railties/builtin/rails_info/rails/info_controller.rb @@ -1,9 +1,15 @@ class Rails::InfoController < ActionController::Base def properties - if consider_all_requests_local || local_request? + if consider_all_requests_local? || local_request? render :inline => Rails::Info.to_html else render :text => '<p>For security purposes, this information is only available to local requests.</p>', :status => :forbidden end end + + protected + + def consider_all_requests_local? + Rails.application.config.consider_all_requests_local + end end |