mini_protection.php 662 B

123456789101112131415161718
  1. <?php
  2. // All thresholds are shared across workers/hosts through the same Redis connection.
  3. return [
  4. 'enabled' => filter_var(env('MINI_PROTECTION_ENABLED', false), FILTER_VALIDATE_BOOLEAN),
  5. 'connection' => 'mini_protection',
  6. 'prefix' => 'water:mini:protection:v1:',
  7. 'max_list_offset' => 10000,
  8. 'limits' => [
  9. 'ip_requests' => [300, 60],
  10. 'ip_endpoint' => [120, 60],
  11. 'account_requests' => [180, 60],
  12. 'account_endpoint' => [60, 60],
  13. // Charged by requested page_size, shared across list endpoints and filters.
  14. 'ip_list_rows' => [12000, 3600],
  15. 'account_list_rows' => [6000, 3600],
  16. ],
  17. ];