You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'd like to place a particular middleware first in the middleware stack but i notice that theres not a method in Sinatra::Base to accomplish this. The only method available is def use(middleware, *args, &block) which will be placed at the bottom of the stack. I was looking for something similar to Rails config.middleware.insert_before(existing_middleware, new_middleware, args). Can we have a feature for this? In the meanwhile, how can I extend Sinatra / Base to insert a middleware at a certain position on the stack?
The text was updated successfully, but these errors were encountered:
Also remove the very old[1] `does not include ...` comment.
Fighting the test I had to change made me realize just how much the
order of middlewares matters. Not very intuitive 😞.
Maybe someday someone will get to sinatra#1659Closesinatra#1930
1: sinatra@0985552
Hello, I'd like to place a particular middleware first in the middleware stack but i notice that theres not a method in
Sinatra::Base
to accomplish this. The only method available isdef use(middleware, *args, &block)
which will be placed at the bottom of the stack. I was looking for something similar to Railsconfig.middleware.insert_before(existing_middleware, new_middleware, args)
. Can we have a feature for this? In the meanwhile, how can I extend Sinatra / Base to insert a middleware at a certain position on the stack?The text was updated successfully, but these errors were encountered: