JCOre Limiter
Rate limit endpoints in the WP-Rest API.
by JCO Digital · github.com/jco-digital/jco-limiter · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jco-digital/jco-limiter/archive/refs/heads/master.zipReadme
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.