mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-24 06:22:31 -05:00
65edbb609c
This reverts commit 47e718f5b2
.
13 lines
611 B
Ruby
13 lines
611 B
Ruby
# we want MesageBus in the absolute front
|
|
# this is important cause the vast majority of web requests go to it
|
|
# this allows us to avoid full middleware crawls each time
|
|
Rails.configuration.middleware.delete MessageBus::Rack::Middleware
|
|
Rails.configuration.middleware.unshift MessageBus::Rack::Middleware
|
|
|
|
# no reason to track this in development, that is 300+ redis calls saved per
|
|
# page view (we serve all assets out of thin in development)
|
|
if Rails.env != 'development' || ENV['TRACK_REQUESTS']
|
|
require 'middleware/request_tracker'
|
|
Rails.configuration.middleware.unshift Middleware::RequestTracker
|
|
end
|
|
|