From 2faca267431456cb0d345df77702bc325b837da4 Mon Sep 17 00:00:00 2001 From: cedric lombardot Date: Thu, 12 May 2022 10:00:39 +0200 Subject: [PATCH 1/2] Update composer.json --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index e3238d5..8889f75 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ "php": "^7.1.3 || ^8.0", "api-platform/core": "^2.4", "doctrine/annotations": "^1.4", - "symfony/cache": "^3.4 || ^4.4 || ^5.0", - "symfony/config": "^3.4 || ^4.4 || ^5.0", - "symfony/dependency-injection": "^3.4 || ^4.4 || ^5.0", - "symfony/http-foundation": "^3.4 || ^4.4 || ^5.0", - "symfony/http-kernel": "^4.4 || ^5.0", - "symfony/security-bundle": "^3.4 || ^4.4 || ^5.0" + "symfony/cache": "^3.4 || ^4.4 || ^5.0 || ^6.0", + "symfony/config": "^3.4 || ^4.4 || ^5.0 || ^6.0", + "symfony/dependency-injection": "^3.4 || ^4.4 || ^5.0 || ^6.0", + "symfony/http-foundation": "^3.4 || ^4.4 || ^5.0 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", + "symfony/security-bundle": "^3.4 || ^4.4 || ^5.0 || ^6.0" }, "autoload": { "psr-4": { From 49173d1f2f83c94ee39f064fa3ae1159d54c46ad Mon Sep 17 00:00:00 2001 From: cedric lombardot Date: Thu, 12 May 2022 10:05:19 +0200 Subject: [PATCH 2/2] Update RateLimitListener.php --- EventListener/RateLimitListener.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EventListener/RateLimitListener.php b/EventListener/RateLimitListener.php index b1a53b6..dd48c5a 100644 --- a/EventListener/RateLimitListener.php +++ b/EventListener/RateLimitListener.php @@ -57,7 +57,11 @@ public function onKernelRequest(RequestEvent $event) } // only process on master request - if (!$event->isMasterRequest()) { + if (method_exists($event, 'isMasterRequest') && !$event->isMasterRequest()) { + return; + } + + if (!$event->isMainRequest()) { return; }