diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 10:51:19 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-02-02 10:51:19 +1100 |
commit | d1eed079e1338249aa3b2881d07029ac4e71f4ed (patch) | |
tree | 18088ca9388e1b7bd27fffea8cb41fa52b618c34 /railties/builtin/rails_info | |
parent | ddf2b4add33d5e54c5f5e7adacadbb50d3fa7b52 (diff) | |
parent | b9edb0c60c11025311fb06f2e60b3354f1b6cb09 (diff) | |
download | rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.tar.gz rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.tar.bz2 rails-d1eed079e1338249aa3b2881d07029ac4e71f4ed.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'railties/builtin/rails_info')
-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 |