petenelson / wp-rest-api-toolbox

WordPress plugin to tweak the REST API settings
https://wordpress.org/plugins/rest-api-toolbox/
45 stars 7 forks source link

Add option to remove / restrict access to the entire wp-json API and custom namespaces, not just posts within the wp/v2 namespace #42

Open rfair404 opened 5 years ago

rfair404 commented 5 years ago

Thank you for this plugin: it is helpful in limiting access to the API as described. I'm wondering if you can add the ability to restrict access the top level API endpoint wp-json as well as custom namespaces registered by plugins like: yoast/v1 (created by Yoast SEO), wordpress-popular-posts/v1 (created by WPPP), and other similar namespaced routes.

Thanks!

petenelson commented 5 years ago

It may be possible to restrict access to custom namespaces, though it may cause unintended consequences to do so, so it would be something you'd use at your own risk. I'll take a look at it in a future release.