Untitled
Anonymous
csharp
02/27/2025 7:54 AM
432 B
17
Indexable
services.AddRateLimiter(options =>
options.AddPolicy("PerIpRateLimit", context =>
RateLimitPartition.GetFixedWindowLimiter(
context.Connection.RemoteIpAddress.ToString(),
_ => new FixedWindowRateLimiterOptions
{
PermitLimit = 100,
Window = TimeSpan.FromMinutes(1)
}));
);
app.UseRateLimiter();
Editor is loading...
Leave a Comment