diff --git a/robyn/router.py b/robyn/router.py index b79b73c28..646918b8f 100644 --- a/robyn/router.py +++ b/robyn/router.py @@ -207,7 +207,8 @@ def inner_handler(request: Request, *args): if identity is None: return self.authentication_handler.unauthorized_response request.identity = identity - return handler(request, *args) + + return request self.add_route(MiddlewareType.BEFORE_REQUEST, endpoint, inner_handler, injected_dependencies) return inner_handler