Undefined Features In Development

To enable a more streamlined developer experience, we can treat undefined features as Always On, to avoid having to go into Toggly and define the feature.

Simply add UndefinedEnabledOnDevelopment to AddTogglyWeb.

builder.Services.AddTogglyWeb(options =>
{
    options.AppKey = builder.Configuration["Toggly:AppKey"]!;
    options.Environment = builder.Configuration["Toggly:Environment"]!;
    options.UndefinedEnabledOnDevelopment = true;
});

This works with app.Environment.IsDevelopment() to only affect development. For all other environments, you'll still need to define the feature

Last updated

Was this helpful?