• Hi!
    Whenever I enable this plugin and set cache everything, after some days I get a 403 error on jquery function requests which include:

    1. Ajax search requests on the website
    2. Emoji count in any post
    3. related post ajax arrow to load more posts

    The error can be seen if you inspect the page and do any of the above tasks.

    Here’s the ss:
    https://ibb.co/ySGHFsQ

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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

    Thread Starter romant14

    (@romant14)

    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.

    Thread Starter romant14

    (@romant14)

    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

    Thread Starter romant14

    (@romant14)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Jquery returning 403 error when I enable this plugin’ is closed to new replies.