EasyAbp.Abp.UsingLimiter 0.1.0

dotnet add package EasyAbp.Abp.UsingLimiter --version 0.1.0
NuGet\Install-Package EasyAbp.Abp.UsingLimiter -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyAbp.Abp.UsingLimiter" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyAbp.Abp.UsingLimiter --version 0.1.0
#r "nuget: EasyAbp.Abp.UsingLimiter, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasyAbp.Abp.UsingLimiter as a Cake Addin
#addin nuget:?package=EasyAbp.Abp.UsingLimiter&version=0.1.0

// Install EasyAbp.Abp.UsingLimiter as a Cake Tool
#tool nuget:?package=EasyAbp.Abp.UsingLimiter&version=0.1.0

Abp.UsingLimiter

An Abp module helps you control how often your service is used.

Getting Started

Download and Install the latest Abp.UsingLimiter from NuGet or via CLI:

PM> Install-Package EasyAbp.Abp.UsingLimiter
PM> Install-Package EasyAbp.Abp.UsingLimiter.Client
PM> Install-Package EasyAbp.Abp.UsingLimiter.Ip
  1. Added [DependsOn(typeof(AbpLimiterModule))] attribute to the module.
  2. Added [DependsOn(typeof(AbpClientLimiterModule))] attribute to the module.
  3. Added [DependsOn(typeof(AbpIpLimiterModule))] attribute to the module.

Usage

1��Extends IHostBuilder with Limiter configuration methods.

IHostBuilder.UseAbpLimiter(RateLimitType.All);

2��Declare the following namespace within AppModule.cs

using EasyAbp.Abp.UsingLimiter.DependencyInjection;
//client rate limiting
using EasyAbp.Abp.UsingLimiter.Client;
using EasyAbp.Abp.UsingLimiter.Client.DependencyInjection;
//Ip rate limiting
using EasyAbp.Abp.UsingLimiter.Ip;
using EasyAbp.Abp.UsingLimiter.Ip.DependencyInjection;

3��Register the middleware

app.UseIpRateLimiting();
app.UseClientRateLimiting();

4��Add the following code at ConfigureServices() method

  context.Services.AddLimiterService<MemoryCacheRateLimitCounterStore>(service =>
  {
        service.AddLimiterIpService<MemoryCacheIpPolicyStore>();
        service.AddLimiterClientService<MemoryCacheClientPolicyStore>();
 });

Documentation

Rate limiting based on client IP

Rate limiting based on client ID

Roadmap

  • Unit test
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EasyAbp.Abp.UsingLimiter:

Package Downloads
EasyAbp.Abp.UsingLimiter.Client

ABP vNext framework Limiter Client module.

EasyAbp.Abp.UsingLimiter.Ip

ABP vNext framework Limiter Ip module.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0 714 3/22/2020