So, I deduced from the documentation rack, but maybe I'm wrong ...
Of course. You can write rack middleware to add additional routing handlers before the request hits the rails application.
http://guides.rubyonrails.org/rails_on_rack.html
Alternatively, you can also run "rake middleware" to view installed rack modules.