Problem rule admin-ajax.php 403

I have a problem in my wordpress console submitting a form via ajax. The problem comes from the Cloudflare cache, I tried to create a rule, but it doesn’t work…

Thank you for writing and sharing screenshots.

I wonder, I see you’re using Cloudflare APO for WordPress by the HTTP headers.

There were lately few topics where Cloudfalre throw 520 while using APO :thinking:
I am asking below questions to try to figure out and make a connection, if it is the case related to it.

Was it working normally before APO?
If you temporary enable the “Pause Cloudflare for this site” option from the CF dashboard bottom-right corner, does it work then or still shows the same warning/error?

May I ask have you tried navigating to the “Network” tab of Developer Tools (F12) to see what is the response of the XHR admin-ajax.php request? :thinking:

Furthermore, I wonder if any of Cloudflare security & protection settings like Bot Fight Mode or Browser Integrity Check challenged or blocked the request :thinking:

Kindly could you provide some more details about which service did it trigger and got that result in the Cloudflare dashboard → Security → Overview for the past 24hours or so. Once you find them, click on a particular one to find more details about it (user-agent, IP, HTTP version …).

Nevertheless, I am not sure if that request to the admin-ajax.php was made via WordPress itself or via some plugin?

Just in case, related to the WordPress, I’d suggest you to whitelist your origin host / server / hosting IP address by navigating to the Security → WAF → Tools → IP Access Rules with the action “allow” for your Website and try again.

It knows to happen due to the WordPress using HTTP/1.0 and empty user-agent, therefore while executing WP-Cron or some other related JSON/REST API request via plugin.

I can also see the IP starts with 188.xx from Cloudflare which sometimes at different locations throws some errors or has issues with resolving (if we’d use search :search: on these forums we can find those relevant topics about this case - if in any co-relation with your).

if i pause Cloudflare the problem still happens. This excludes Cloudflare from any reason for the problem, correct?

1 Like

Correct. You can see the 403 is coming from the NGINX server at your IP address, and not server: cloudflare.

1 Like