New routing allows to use rack applications as endpoints like this:
match '/discovery', :to => DiscoveryService
match '/logging', :to => LoggingService
But given the middleware stack that I see, it's not obvious how I can
skip things like cookies, session, flash and parameter parsing which I
may not want to use with my rack apps.
The only option I can come up with is to insert custom middleware
handler, say, right after QueryCache and do traditional "intercept or
pass through" trick. But that would omit all the routes.rb hotness.
And in cases with multiple endpoints it would spawn another code with
routing responsibility (and possibly configuration).
Is there a good way to have new routing for rack apps in routes.rb and
stay free from unnecessary middleware at the same time?