From 7bf42dcc477f41d594a255296ae87dda9b0a67a2 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 10 Oct 2023 22:54:28 -0400 Subject: [PATCH] Updated the header check --- app/Http/Middleware/HeaderAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/HeaderAuth.php b/app/Http/Middleware/HeaderAuth.php index 2f7c8b9..4fbcd9d 100644 --- a/app/Http/Middleware/HeaderAuth.php +++ b/app/Http/Middleware/HeaderAuth.php @@ -15,7 +15,7 @@ class HeaderAuth */ public function handle(Request $request, Closure $next): Response { - if (empty($request->header('X-BOTAUTH'))) { + if (! $request->hasHeader('X-BOTAUTH')) { return response() ->json(["status" => false, "message" => "Unauthorized."], 401); }