From 2592bfe30531b40fceea727dcc2ef413e981c2e3 Mon Sep 17 00:00:00 2001 From: sysadmin Date: Tue, 18 Nov 2025 15:22:39 +0000 Subject: [PATCH] fix: Increase rate limits for testing/pre-production environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- LittleShop/Program.cs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/LittleShop/Program.cs b/LittleShop/Program.cs index 60125bd..bc9f2a4 100644 --- a/LittleShop/Program.cs +++ b/LittleShop/Program.cs @@ -56,71 +56,71 @@ builder.Services.Configure(options => options.ClientIdHeader = "X-ClientId"; options.GeneralRules = new List { - // 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 } }; });