Ajax file upload blocked at Cloudflare after several uses

I have a relatively simple website running in Drupal and hosted on Dreamhost that sits behind Cloudflare. The vast majority of the site sits behind a login and all of it runs over https. Part of the site functionality involves uploading documents (usually less than 5MB). We use a Drupal plugin (filebrowser) that manages file uploads by posting to an Ajax endpoint. This all works fine for the first 5-ish uploads. After that, all requests to the AJAX endpoint are blocked for 24 hours. Everything else continues to work fine throughout the site.

Once it starts to error I get the following in my browser:

(Network Monitor)
:status: 400
Content-Type: text/html
Content-Length: 171
Date: Wed, 07 Aug 2019 22:36:33 GMT
cf-ray: ***-IAD
Server: Cloudflare

An AJAX HTTP error occurred.
HTTP Result Code: 400
Debugging information follows.
Path: /filebrowser/action/upload/ajax/133/1191?element_parents=u_file&_wrapper_format=drupal_ajax&ajax_form=1
StatusText: error
400 Bad Request
400 Bad Request

I’ve looked all over the forums and the usual response is that a 400 error comes from my server. I get nothing on my server though. The requests show up in my access logs when they work and do not after I get this error. If I bypass Cloudflare it works consistently, so I am somewhat confident in the server configuration.

In an attempt to make it work at all I’ve configured a page rule that tries to disable everything for this URL: Disable Security, Browser Integrity Check: Off, SSL: Full, Security Level: Essentially Off, Cache Deception Armor: Off, Disable Apps, Disable Performance

That rule has had zero effect on the behavior. I’m at a loss as to how to proceed. Any help would be appreciated.

This topic was automatically closed after 30 days. New replies are no longer allowed.