Завершил работу с RateLimiter
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 4m35s
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 4m35s
This commit is contained in:
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- [ ] Добавить RateLimiter
|
- [x] Добавить RateLimiter
|
||||||
- [ ] Добавить обработку ошибок при запросах к modeus
|
- [ ] Добавить обработку ошибок при запросах к modeus
|
@@ -82,7 +82,7 @@ builder.Services.AddRateLimiter(options =>
|
|||||||
: (httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown"),
|
: (httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown"),
|
||||||
factory: _ => new FixedWindowRateLimiterOptions
|
factory: _ => new FixedWindowRateLimiterOptions
|
||||||
{
|
{
|
||||||
PermitLimit = 20,
|
PermitLimit = 40,
|
||||||
Window = TimeSpan.FromSeconds(10)
|
Window = TimeSpan.FromSeconds(10)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user