diff options
author | Henare Degan <henare.degan@gmail.com> | 2013-08-10 15:29:15 +0300 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2013-08-10 15:29:15 +0300 |
commit | fd8e093ee8aeb5ad92198be51178492c088ff506 (patch) | |
tree | 8184e307045bb594d0deefe704f3df0729277455 /app/controllers/application_controller.rb | |
parent | bef107cb9836c9e4a659ac1b621f327ec0f75658 (diff) |
Don't show diagnostic messages when request is simply local
This fixes the scenario when Alaveteli is behind a proxy in production
Resolves #1039
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 88b107861..2cbb826af 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -119,12 +119,9 @@ class ApplicationController < ActionController::Base end def render_exception(exception) - - # In development, or the admin interface, or for a local request, let Rails handle the exception - # with its stack trace templates. Local requests in testing are a special case so that we can - # test this method - there we use consider_all_requests_local to control behaviour. - if Rails.application.config.consider_all_requests_local || local_request? || - (request.local? && !Rails.env.test?) + # In development or the admin interface let Rails handle the exception + # with its stack trace templates + if Rails.application.config.consider_all_requests_local || local_request? raise exception end |