Rate-Limit a Custom REST Endpoint
Adds per-IP rate limiting to a custom REST endpoint using transients, returning HTTP 429 once a caller exceeds 30 requests per minute.
PHPProby SnipCraft
This is a Pro snippet
The full code for “Rate-Limit a Custom REST Endpoint” is part of the SnipCraft Pro library. Get every Pro snippet and module, and import them in one click.
Get SnipCraft ProQuestions about Pro? Contact us.
#rate-limiting#rest-api#security#transients