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;
});

Don't worry, we auto-detect new flags being checked, and show you any undefined ones on the Feature Definitions page at the bottom.

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

Last updated