1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Increase API limit for the mobile apps

This commit is contained in:
Hillel Coren 2017-08-13 13:47:04 +03:00
parent fa6f8d0e82
commit 08244bb8c5

View File

@ -77,7 +77,7 @@ class ApiCheck
// http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users
$hour = 60 * 60;
$hour_limit = 100; // users are limited to 100 requests/hour
$hour_limit = $hasApiSecret ? 1000 : 100; // users are limited to 100 requests/hour (or 1000 for the mobile apps)
$hour_throttle = Cache::get("hour_throttle:{$key}", null);
$last_api_request = Cache::get("last_api_request:{$key}", 0);
$last_api_diff = time() - $last_api_request;