Update route specific handling to use PathPrefix

The route specific example only works with one specific URL path. In order to run middleware under an entire route (eg /api in this example), PathPrefix must be used to create a matching route on the root handler.