Update: 2026-06-23 18:32:23
This commit is contained in:
@@ -186,14 +186,14 @@ function sendIntaleqOtp(string $receiver, string $otp, string $method = 'whatsap
|
|||||||
$apiUrl = 'https://otp.intaleqapp.com/api/request-otp.php';
|
$apiUrl = 'https://otp.intaleqapp.com/api/request-otp.php';
|
||||||
$payload = [
|
$payload = [
|
||||||
'phone' => $phoneWithPlus,
|
'phone' => $phoneWithPlus,
|
||||||
'app_key' => $appKey,
|
|
||||||
'device_type' => 'android',
|
'device_type' => 'android',
|
||||||
'method' => $method,
|
'method' => $method,
|
||||||
'code' => $otp
|
'code' => $otp
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = curlCall("POST", $apiUrl, json_encode($payload), [
|
$response = curlCall("POST", $apiUrl, json_encode($payload), [
|
||||||
'Content-Type: application/json'
|
'Content-Type: application/json',
|
||||||
|
"X-App-Key: $appKey"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($response) {
|
if ($response) {
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ class RateLimiter
|
|||||||
$this->redis->expire($key, $window);
|
$this->redis->expire($key, $window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable limit for register during debugging
|
||||||
|
if ($type === 'register') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return $current <= $max;
|
return $current <= $max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user