diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fe1c1c7..65f0686 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,6 +7,7 @@ class ApplicationController < ActionController::Base # filter_parameter_logging :password before_action :get_current_users_screenshots, :debian_sso + before_action :better_errors_hack, if: -> { Rails.env.development? } # Query for packages that were uploaded by the current user. # As AAA is not yet implemented it means looking for uploads @@ -50,4 +51,11 @@ class ApplicationController < ActionController::Base def after_sign_in_path_for(resource) my_welcome_path end + + # better_errors gets extremely slow without this hack + # see: https://github.com/charliesome/better_errors/issues/341 + def better_errors_hack + env['puma.config'].options.user_options.delete :app + end + end