From a4b5a2545c57dcb36e4a828f3f88232ae78ee361 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 22 Jul 2026 01:04:57 +0300 Subject: [PATCH] Update: 2026-07-22 01:04:56 --- backend/core/Auth/RateLimiter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/core/Auth/RateLimiter.php b/backend/core/Auth/RateLimiter.php index 157d22ee..f6864eae 100644 --- a/backend/core/Auth/RateLimiter.php +++ b/backend/core/Auth/RateLimiter.php @@ -56,6 +56,10 @@ class RateLimiter // ── تطبيق الحد وإيقاف الطلب إن تجاوز ───────────────────── public function enforce(string $identifier, string $type = 'api'): void { + if (getenv('DISABLE_RATE_LIMITER') === 'true' || ($_ENV['DISABLE_RATE_LIMITER'] ?? '') === 'true') { + return; + } + if (!$this->check($identifier, $type)) { $limit = self::LIMITS[$type] ?? self::LIMITS['api']; $window = $limit['window'];