Skip to content

Positioning a new middleware in stackΒ #1659

Open
@marcelobfonseca

Description

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?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions