I got 403 forbidden when using Cloudflare

Hi everyone.

My website makes a GET request via the Wordpress API (/wp-json/lp/v1/lazy-load/course-curriculum?courseId=21323&page=1&sectionID=&_locale=user) to get information.

When I’m using Cloudflare, my Nginx is returning 403 for the request. If I enable “developer mode” in cloudFlare, the site works fine, and I no longer have the 403 error.

Even if I copy and paste the API request URL into the browser, the response is positive, without errors.

Any help ?

I found out that the problem was caching the “X-Wp-Nonce” header in the request. I’ve configured in caching rules to skip cache when request have X-Wp-Nonce in header.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.