-
Notifications
You must be signed in to change notification settings - Fork 447
Version 3.0.0 Breaking Changes
Cristi Pufu edited this page Dec 12, 2020
·
2 revisions
The changes are explained in more details in this pull request
-
The target framework has been updated to
netstandard2.0
. -
We have to manually seed the
appsettings.json
policies:
public static async Task Main(string[] args)
{
IWebHost webHost = CreateWebHostBuilder(args).Build();
using (var scope = webHost.Services.CreateScope())
{
// get the ClientPolicyStore instance
var clientPolicyStore = scope.ServiceProvider.GetRequiredService<IClientPolicyStore>();
// seed Client data from appsettings
await clientPolicyStore.SeedAsync();
// get the IpPolicyStore instance
var ipPolicyStore = scope.ServiceProvider.GetRequiredService<IIpPolicyStore>();
// seed IP data from appsettings
await ipPolicyStore.SeedAsync();
}
await webHost.RunAsync();
}
- We have to register the rate limit configuration in
Startup.cs
:
// configure the resolvers
services.AddSingleton<IRateLimitConfiguration, RateLimitConfiguration>();