title: Excluding middleware from Slim route
body: <p>Per <a href="http://www.slimframework.com/docs/concepts/middleware.html" rel="nofollow">http://www.slimframework.com/docs/concepts/middleware.html</a>, one can add middleware to an application, route, or group.</p>
  
  <p>How should one add middleware to all routes (i.e. to the application), but exclude it from specific routes?</p>
  
  <p>EDIT.  As a possible solution, I am thinking of adding some logic in my application middleware to bypass the middleware functionality. Getting the method is easy enough using <code>$request-&gt;getMethod()</code>, however, the other URL methods described by <a href="http://www.slimframework.com/docs/objects/request.html" rel="nofollow">http://www.slimframework.com/docs/objects/request.html</a> are not available in the middleware.</p>