How It Works
ThornGuard uses a per-license limiter backed primarily by a Cloudflare Durable Object, with a KV fallback path available for resilience:- Each license hash maps to one rate-limiter object.
- Requests are counted in one-minute windows.
- The gateway checks the current window before proxying upstream.
- When the limit is exceeded, ThornGuard returns
429 Too Many Requestsand includes aRetry-Afterheader.
Default Thresholds
| Tier | Requests per Minute | Configurable |
|---|---|---|
| Individual | 1,000 | Not self-service today |
| Enterprise | Unlimited by default (0) | Configurable per license |
Rate limits exist in per-license settings, but they are not currently exposed
as a self-service field in the live dashboard UI.
What Happens When Rate Limited
When a request exceeds the rate limit:- The proxy returns an HTTP 429 Too Many Requests response.
- A
BLOCKED_RATE_LIMITaction is logged in your audit trail. - The response includes a
Retry-Afterheader telling the client when the current window rolls over.
Counters reset automatically at the start of each new one-minute window.
Tier Detection
ThornGuard determines your plan tier automatically from your Polar.sh license:- Individual:
limitActivations= 3 - Enterprise:
limitActivations>= 30