Better Debugging

This commit is contained in:
int2001
2026-01-07 07:50:00 +00:00
parent 2ce1636786
commit 8979ed4c0c
2 changed files with 1 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ class API extends CI_Controller {
$result = $this->rate_limit->check($endpoint, $identifier);
if (!$result['allowed']) {
log_message("Debug","Rate limit for ".$endpoint." and ID:".($identifier ?? '')." exceeded");
$this->rate_limit->send_limit_exceeded_response($result['retry_after']);
return false;
}

View File

@@ -166,7 +166,6 @@ class Rate_limit {
* @param int $retry_after Seconds until retry is allowed
*/
public function send_limit_exceeded_response($retry_after) {
log_message("Error","Rate limit exceeded");
http_response_code(429);
header('Retry-After: ' . $retry_after);
echo json_encode([