Skip to content

Commit

Permalink
Only sleep for one second for anonymous.
Browse files Browse the repository at this point in the history
We should really make this more robust. Like allowing same domain AJAX calls to bypass this entirely
  • Loading branch information
DiegoPino committed Aug 17, 2021
1 parent cb9b9c4 commit 0cf60f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/AuthAutocompleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function handleAutocomplete(Request $request, $auth_type, $vocab = 'subje
return new JsonResponse($cached->data);
}
if ($this->currentUser->isAnonymous() && !$is_internal) {
sleep(5);
sleep(1);
}

switch ($auth_type) {
Expand Down

0 comments on commit 0cf60f0

Please sign in to comment.