replaced _.every with a simple for-in loop when matching routes for local api dispatching