Commit a08269f91e4f8c55cc94deb95b32e527ee98d5aa

Authored by Nathan Broadbent
1 parent ce90ab69
Exists in master and in 1 other branch production

Added config option to turn on/off internal error details in production

config/config.example.yml
... ... @@ -39,6 +39,12 @@ user_has_username: false
39 39 # but you want to leave a short comment.
40 40 allow_comments_with_issue_tracker: true
41 41  
  42 +# Display internal errors in production
  43 +# Since this is an internal application, you might like to see what caused Errbit to crash.
  44 +# Pull requests are always welcome!
  45 +# However, you might be more comfortable setting this to false if your server can be accessed by anyone.
  46 +display_internal_errors: true
  47 +
42 48 # Enable Gravatar.
43 49 use_gravatar: true
44 50 # Default Gravatar image, can be: mm, identicon, monsterid, wavatar, retro.
... ...
config/environments/production.rb
... ... @@ -5,8 +5,8 @@ Errbit::Application.configure do
5 5 # Code is not reloaded between requests
6 6 config.cache_classes = true
7 7  
8   - # Full error reports are enabled, since this is an internal application.
9   - config.consider_all_requests_local = true
  8 + # Shows or hides all error details if something goes wrong inside Errbit
  9 + config.consider_all_requests_local = Errbit::Config.display_internal_errors
10 10 # Caching is turned on
11 11 config.action_controller.perform_caching = true
12 12  
... ...