added $request parameter to App::before function