Public/Private API endpoints not respected
-
Hi there,
First of all: Thanks for this awesome and free plugin!
On my WordPress site I have blocked public REST API access, which means that only authenticated WordPress users should be able to query the API. Unfortunately, the WP REST Cache plugin also returns cached content for unauthenticated users. So for example, if the REST cache is cleared and I send a request to an API route as an authenticated user, the returned content gets cached (so for so good). But if then an unauthenticated user requests the same, he will get the cached content, although if he is not authenticated. This means that private content could be exposed.
Is there a way to check whether the user is authenticated or not before returning cached content, or to respect protected/unprotected API routes?
The topic ‘Public/Private API endpoints not respected’ is closed to new replies.