fix: Increase rate limits for testing/pre-production environment
- Order creation: 3/min → 1000/min, 10/hour → 10000/hour - Payment creation: 5/min → 1000/min, 20/hour → 10000/hour - General API: 10/sec → 1000/sec, 100/min → 10000/min - All endpoints: Increased limits to prevent rate limiting during testing Resolves payment order creation failures caused by strict rate limiting. Previous limits were too restrictive for integration testing with TeleBot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bd8fa6ddf7
commit
2592bfe305
@ -56,71 +56,71 @@ builder.Services.Configure<AspNetCoreRateLimit.IpRateLimitOptions>(options =>
|
||||
options.ClientIdHeader = "X-ClientId";
|
||||
options.GeneralRules = new List<AspNetCoreRateLimit.RateLimitRule>
|
||||
{
|
||||
// Critical: Order creation - very strict limits
|
||||
// Critical: Order creation - very high limits for testing/pre-production
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders",
|
||||
Period = "1m",
|
||||
Limit = 3
|
||||
Limit = 1000
|
||||
},
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders",
|
||||
Period = "1h",
|
||||
Limit = 10
|
||||
Limit = 10000
|
||||
},
|
||||
// Critical: Payment creation - strict limits
|
||||
// Critical: Payment creation - very high limits for testing/pre-production
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders/*/payments",
|
||||
Period = "1m",
|
||||
Limit = 5
|
||||
Limit = 1000
|
||||
},
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders/*/payments",
|
||||
Period = "1h",
|
||||
Limit = 20
|
||||
Limit = 10000
|
||||
},
|
||||
// Order lookup by identity - moderate limits
|
||||
// Order lookup by identity - very high limits
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "*/api/orders/by-identity/*",
|
||||
Period = "1m",
|
||||
Limit = 10
|
||||
Limit = 1000
|
||||
},
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "*/api/orders/by-customer/*",
|
||||
Period = "1m",
|
||||
Limit = 10
|
||||
Limit = 1000
|
||||
},
|
||||
// Cancel order endpoint - moderate limits
|
||||
// Cancel order endpoint - very high limits
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders/*/cancel",
|
||||
Period = "1m",
|
||||
Limit = 5
|
||||
Limit = 1000
|
||||
},
|
||||
// Webhook endpoint - exempt from rate limiting
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "POST:*/api/orders/payments/webhook",
|
||||
Period = "1s",
|
||||
Limit = 1000
|
||||
Limit = 10000
|
||||
},
|
||||
// General API limits
|
||||
// General API limits - very high for testing/pre-production
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "*",
|
||||
Period = "1s",
|
||||
Limit = 10
|
||||
Limit = 1000
|
||||
},
|
||||
new AspNetCoreRateLimit.RateLimitRule
|
||||
{
|
||||
Endpoint = "*",
|
||||
Period = "1m",
|
||||
Limit = 100
|
||||
Limit = 10000
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user