public FeaturePolicyMiddleware(FeatureDirectiveList options) { Options = options ?? throw new ArgumentNullException(nameof(options)); _headerValue = Options.ToString(); }
public static IServiceCollection AddFeaturePolicy(this IServiceCollection services, FeatureDirectiveList options) { services.AddSingleton <FeaturePolicyMiddleware>(); services.AddSingleton(options); return(services); }