Plugin Contributor
iSaumya
(@isaumya)
Hi,
it is hard to say what’s going on here with this little info provided. But if I break it down Error 403 denotes Forbidden which means that the serve is not allowing the system to access the object.
Now looking at the screenshot I saw that the jQuery script is trying to access the WP REST API endpoint over POST method. So, as the access is happening over POST method it is 100% not an issue related to caching. As POST requests will always be bypassed from cache.
The second problem can be related to Cloudflare Firewall. A lot of the time when accessing the WP REST API – Cloudflare detects some sort of security flaw and blocks that request. Check the firewall log in your Cloudflare dashboard for more details.
Generally, I would recommend you to add a page rule like this manually which will basically disable all kinds of firewall security for the WP REST API endpoints.
Screenshot: https://i.imgur.com/3pC19Fx.jpeg
Hi!
I’m not sure if I have disabled the Rest API. I do try visiting the siteurl.com/wp-json and it’s opening there. I do have Wordfence with default settings and have added the page rule on CF. Let’s see how it goes.
I do have disabled XMLRPC.
Okay, the error doesn’t appear if I put /? or /?nocache in any of those URL pages.
You can validate this by clicking on the emoji count at the end of any post with the url/? or ?nocache.
Plugin Contributor
iSaumya
(@isaumya)
Inside the plugin settings page under teh cache tab there are list of things mentioned that are not supposed to be cached. Within there the RESt API is also mentioned. Cacn you enable that check if your problem gets resolved?
Screenshot: https://i.imgur.com/h3akjKk.jpeg
Yes, Rest API was not checked. Purged whole cache. Let’s see how it goes.
Plugin Contributor
iSaumya
(@isaumya)
OK. Let me know. It is not supposed to be checked by default but in your case I asked you to try it out to see if it helps you.