From 4413f642df89fbab35d7df774a5fc7797b358037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Nordstrand?= Date: Mon, 2 Sep 2024 11:52:00 +0200 Subject: [PATCH] Teamtailor had issues with pointing to the correct careersite Because the section io host middleware ended up too far down the stack after the change. So we have had to move up the request queue middleware to the top of the stack. Co-authored-by: Jonas B --- README.md | 5 ----- lib/request_queue_time/railtie.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e8bff5..4aa1958 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,6 @@ If you want it first in the stack: Rails.configuration.middleware.insert_before 0, RequestQueueTime::Middleware ``` -If you want to use it like it is in the railtie: -```rb - Rails.configuration.middleware.insert_before Rack::Runtime, RequestQueueTime::Middleware -``` - The following is required for the sidekiq portion to work though: diff --git a/lib/request_queue_time/railtie.rb b/lib/request_queue_time/railtie.rb index 940688d..a05f41f 100644 --- a/lib/request_queue_time/railtie.rb +++ b/lib/request_queue_time/railtie.rb @@ -1,7 +1,7 @@ module RequestQueueTime class Railtie < Rails::Railtie initializer "RequestQueueTime.request_middleware" do |app| - app.middleware.insert_before Rack::Runtime, RequestQueueTime::Middleware + app.middleware.insert_after 0, RequestQueueTime::Middleware end end end