Restrict access to the WordPress REST API posts endpoint with basic auth
We wanted to stop this leaking all our posts but also allow it for certain purposes with a username and password. Some solutions are very heavy-handed and can cause issues with plugins etc if you simply disable it all! With this method you can just lock down certain endpoints that you are worried about. This... » read more