Explain NestJS Guards and how they differ from Middleware.
expand_more
@Injectable(), implement the CanActivate interface. They determine whether a request should be processed by the controller handler based on permissions, roles, or ACL settings. Unlike Middleware, Guards have access to the ExecutionContext, letting them inspect exactly which handler and metadata are targeted next.