From b3d3181ab17c9f87dcf7908a58cda07fd994cac9 Mon Sep 17 00:00:00 2001 From: Jan Raasch Date: Fri, 30 Sep 2016 09:46:14 +0200 Subject: [PATCH] Do not implicitly set up rack-timeout middleware By requiring `rack-timeout`, `Rack::Timeout` is automatically added to the middleware of a Rails application. See https://github.com/heroku/rack-timeout#rails-apps This leads to unexpected behavior. When a user adds a non-standard `Rack-Timeout` to the middleware stack herself, she ends up with `Rack-Timeout` added twice. Worse, the configuration added automatically is the standard configuration which might differ from the one added manually in user land. Worst case comes to show when a user configures a `service_timeout` greater than the standard one. --- lib/raven/integrations/rack-timeout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/raven/integrations/rack-timeout.rb b/lib/raven/integrations/rack-timeout.rb index 83a084885..2e7e3e70e 100644 --- a/lib/raven/integrations/rack-timeout.rb +++ b/lib/raven/integrations/rack-timeout.rb @@ -1,6 +1,6 @@ # rubocop:disable Style/FileName # We need to do this because of the way integration loading works -require 'rack-timeout' +require "rack/timeout/base" # This integration is a good example of how to change how exceptions # get grouped by Sentry's UI. Simply override #raven_context in