title: Rack Middleware in Rack Middleware?
body: <p>I am trying to build a rack middleware <strong>GEM</strong> that uses rack middleware itself (RackWired).</p>
  
  <p>I have an existing application, whose config.ru uses Rack::Builder. In that block (Rack::Builder), I would like to specify my middleware, and when it is called to use a third party middleware (rack-cors) inside my own to do some stuff. Confusing I know.</p>
  
  <p>The problem is that Rack::Builder's context is in config.ru and my middleware (RackWired) is thus unable to access it to "use" the third party middleware (rack-cors).</p>
  
  <p>The intent of my effort is <a href="https://gist.github.com/daneb/48d907d9d07776a7bb85b5f734a5ccb0" rel="nofollow">here</a></p>
  
  <p>Is there a way to use middleware within middleware?</p>
  
  <p>Thank you</p>