Skip to content

Adapters should be Rack apps not middleware #47

Description

@mislav

This is our current Rack app (i.e. the "inner app" wrapped by middleware):

app = lambda { |env|
  response = Response.new
  response.finish(env) unless env[:parallel_manager]
  env[:response] = response
}

It's really kind of a hack. I think our adapters should each perform this and stop acting like middleware when they really play a role of an endpoint. I can't think of a use case where you would want to mount middleware after the adapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions