Skip to content

Commit

Permalink
Merge pull request #5 from Teamtailor/middleware-has-to-be-set-first
Browse files Browse the repository at this point in the history
Teamtailor had issues with pointing to the correct careersite
  • Loading branch information
bjonord authored Sep 2, 2024
2 parents 7c78218 + 4413f64 commit 3ac9a22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<!-- And add the following to the application reloader: -->

Expand Down
2 changes: 1 addition & 1 deletion lib/request_queue_time/railtie.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3ac9a22

Please sign in to comment.