Middlewares only touch requests inside prefix

Get middleware only touching requests within `:prefix` if one is supplied. Makes it easier to integrate with Rails and such.