mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Update app/controllers/shared/api.php
Co-authored-by: kodumbeats <brandon.leckemby@gmail.com>
This commit is contained in:
co-authored by
kodumbeats
parent
0a5646482f
commit
babf31c3a3
@@ -65,7 +65,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e
|
||||
$isAppUser = Auth::isAppUser(Authorization::$roles);
|
||||
|
||||
if (($abuse->check() // Route is rate-limited
|
||||
&& App::getEnv('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') // Abuse is not diabled
|
||||
&& App::getEnv('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') // Abuse is not disabled
|
||||
&& (!$isAppUser && !$isPrivilegedUser)) // User is not an admin or API key
|
||||
{
|
||||
throw new Exception('Too many requests', 429);
|
||||
|
||||
Reference in New Issue
Block a user