From 0a0dd54d0c1b8b909cdce9c8e566592e9fe0073b Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 4 Oct 2024 12:41:13 +0100 Subject: [PATCH] Update WhitelistRangeMiddleware.php Check if the base package firewall is enabled or disabled. If it is disabled then skip returns true. --- src/Middleware/WhitelistRangeMiddleware.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Middleware/WhitelistRangeMiddleware.php b/src/Middleware/WhitelistRangeMiddleware.php index 212198b..a68159d 100644 --- a/src/Middleware/WhitelistRangeMiddleware.php +++ b/src/Middleware/WhitelistRangeMiddleware.php @@ -68,6 +68,7 @@ public function skip($request) { $this->prepare($request); + if ($this->isWhitelist()) { return true; } @@ -76,6 +77,10 @@ public function skip($request) return true; } + if (!config('firewall.enabled', true)) { + return true; + } + return false; } }