Browse Source

Raise API quota to 1 000/day · 7 000/week

At 35 req/min the old 500/day cap fired in ~14 min, making it
redundant with the per-minute block. The new values target slow-drip
scrapers (10–20 req/min sustained all day) while leaving legitimate
integrations (< 500/day) well within budget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
rate-limiter-2026
Edward Ribeiro 3 weeks ago
parent
commit
e6fb5029bb
  1. 4
      sapl/settings.py

4
sapl/settings.py

@ -439,8 +439,8 @@ RATE_LIMIT_BYPASS_PATHS = [
# API quota — daily and weekly call caps for all /api/ callers (anon and auth). # API quota — daily and weekly call caps for all /api/ callers (anon and auth).
# All callers are keyed by IP — auth status is not checked. # All callers are keyed by IP — auth status is not checked.
# Weekly default is 7× the daily cap. # Weekly default is 7× the daily cap.
API_QUOTA_DAILY = config('API_QUOTA_DAILY', default=500, cast=int) API_QUOTA_DAILY = config('API_QUOTA_DAILY', default=1000, cast=int)
API_QUOTA_WEEKLY = config('API_QUOTA_WEEKLY', default=3500, cast=int) API_QUOTA_WEEKLY = config('API_QUOTA_WEEKLY', default=7000, cast=int)
# API-specific per-minute rate limit for external (non-same-origin) anonymous calls. # API-specific per-minute rate limit for external (non-same-origin) anonymous calls.
# Abuse writes rl:api:ip:<ip>:blocked only — never rl:ip:<ip>:blocked. # Abuse writes rl:api:ip:<ip>:blocked only — never rl:ip:<ip>:blocked.

Loading…
Cancel
Save