header('X-BOTAUTH'))) { return response() ->json(["status" => false, "message" => "Unauthorized."], 401); } if (!hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) { return response('Unauthorized', 401); } return $next($request); } }