module HerokuRequestId
  class Railtie < Rails::Railtie
    initializer 'heroku_request_id.add_middleware' do |app|
      app.config.middleware.insert_after 'Rack::Lock', "HerokuRequestId::Middleware"
    end
  end
end

module HerokuRequestId
  class Railtie < Rails::Railtie
    initializer 'heroku_request_id.add_middleware' do |app|
      app.config.middleware.insert 0, "HerokuRequestId::Middleware"
    end
  end
end

Insert the middleware absolutely first in the stack, instead of after Rack::Lock.
Insert the middleware absolutely first in the stack, instead of after Rack::Lock.

This addresses : https://github.com/Octo-Labs/heroku-request-id/issues/1
