Made a MiddlewareEndpointInterface to prevent infinite loops
Now injecting the request into the dispatch method