Skip to content

Commit

Permalink
Merge pull request #2177 from trade-tariff/HMRC-635-Investigate-degra…
Browse files Browse the repository at this point in the history
…ded-performance-for-OTT

HMRC-635 Fix Rack Timeout timeouts to protect app
  • Loading branch information
neilmiddleton authored Feb 4, 2025
2 parents 19171c4 + 73e6010 commit 584471e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ gem 'faraday-retry'
gem 'multi_json'
gem 'net-http-persistent'
gem 'newrelic_rpm'
gem 'rack-timeout'
gem 'routing-filter', github: 'trade-tariff/routing-filter'
gem 'yajl-ruby'

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ GEM
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rack-timeout (0.7.0)
rackup (1.0.0)
rack (< 3)
webrick
Expand Down Expand Up @@ -816,6 +817,7 @@ DEPENDENCIES
puma
rack-cors
rack-test
rack-timeout
rails (~> 8.0)
rails-controller-testing!
redis
Expand Down
1 change: 1 addition & 0 deletions config/initializers/rack_timeout.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rails.application.config.middleware.insert_before Rack::Runtime, Rack::Timeout, service_timeout: ENV.fetch('RACK_TIMEOUT_SERVICE_TIMEOUT', 5).to_i

0 comments on commit 584471e

Please sign in to comment.