(Update) Announce Blacklist

This commit is contained in:
HDVinnie
2018-01-04 22:02:47 -05:00
parent c8c541511a
commit 67fce7be50
@@ -49,14 +49,12 @@ class AnnounceController extends Controller
}
// Check If Client Is Blacklisted
if(config('client-blacklist.enabled' == "true") {
$blockedClients = config('client-blacklist.clients', []);
foreach ($blockedClients as $blocked) {
if ($blocked == $request->server('HTTP_USER_AGENT') ?: "Unknown") {
return response(Bencode::bencode(['failure reason' => 'The Client You Are Trying To Use Has Been Blacklisted']), 200, ['Content-Type' => 'text/plain']);
}
}
}
// If Passkey Is Not Provided Exsist Return Error to Client
if ($passkey == null) {