I want to exclude a controller from .NET Core Web Api, because it's not ready for production.
I know we can add an attribute, but I am trying to do it runtime depending on the environment from the Startup class.
Is there a way to do it when we register the controllers?
Thank you