You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I dont want to include rate limiting for health check when I add endpoint as * eveything is limited and when I add as /eTest-service/eTest/* it allows n number of times, basically limiting not working.
Could you please help on this.
The text was updated successfully, but these errors were encountered:
I have followed as below but not able to figure out the issue.
builder.Services.AddMemoryCache();
builder.Services.Configure(options =>
{
options.GeneralRules = new List
{
new RateLimitRule
{
Endpoint="/eTest-service/eTest/*",
Limit=2,
Period="1m",
}
};
});
builder.Services.AddSingleton<IRateLimitCounterStore, MemoryCacheRateLimitCounterStore>();
builder.Services.AddSingleton<IIpPolicyStore, MemoryCacheIpPolicyStore>();
//builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddSingleton<IRateLimitConfiguration, RateLimitConfiguration>();
builder.Services.AddSingleton<IProcessingStrategy, AsyncKeyLockProcessingStrategy>();
app.UseIpRateLimiting();
I have endpoints as https://testing.com/eTest-service/eTest/method1 or method2 and so on...
Also health check as https://testing.com/health
I dont want to include rate limiting for health check when I add endpoint as * eveything is limited and when I add as /eTest-service/eTest/* it allows n number of times, basically limiting not working.
Could you please help on this.
The text was updated successfully, but these errors were encountered: