From a08269f91e4f8c55cc94deb95b32e527ee98d5aa Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 8 Feb 2013 00:22:25 +1300 Subject: [PATCH] Added config option to turn on/off internal error details in production --- config/config.example.yml | 6 ++++++ config/environments/production.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/config.example.yml b/config/config.example.yml index 532d549..45b4bef 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -39,6 +39,12 @@ user_has_username: false # but you want to leave a short comment. allow_comments_with_issue_tracker: true +# Display internal errors in production +# Since this is an internal application, you might like to see what caused Errbit to crash. +# Pull requests are always welcome! +# However, you might be more comfortable setting this to false if your server can be accessed by anyone. +display_internal_errors: true + # Enable Gravatar. use_gravatar: true # Default Gravatar image, can be: mm, identicon, monsterid, wavatar, retro. diff --git a/config/environments/production.rb b/config/environments/production.rb index 31d0aa9..ed0c8b8 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -5,8 +5,8 @@ Errbit::Application.configure do # Code is not reloaded between requests config.cache_classes = true - # Full error reports are enabled, since this is an internal application. - config.consider_all_requests_local = true + # Shows or hides all error details if something goes wrong inside Errbit + config.consider_all_requests_local = Errbit::Config.display_internal_errors # Caching is turned on config.action_controller.perform_caching = true -- libgit2 0.21.2