Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/jco-digital/jco-limiter/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
JCO Rate Limiter
This is a plugin for restricting access to a/many WP REST API Endpoint.
Example for enabling rate limiting.
register_rest_route(
'v1/rate-limited',
'/rate-limited',
array(
'methods' => 'GET',
'callback' => 'rate_limit_me',
'permission_callback' => '__return_true',
'rate_limiter' => array(
'uses' => 5,
'interval' => 120,
),
)
);
Adding the rate_limiter array will enable ratelimiting.