Whitelist ACF ajax requests with regex
-
We have Wordfence setup on a site that heavily utilizes ACF flexible content fields for page layout. One thing that ACF does is use an ajax request to keep track of the state of content blocks being expanded or collapsed in the editor. We have had the firewall setup in learning mode and it does send a popup every time ACF sends an ajax request that we then set to whitelist. We can see the list of whitelisted actions in the dashboard. The problem is that each content block has a unique parameter and it seems as if it will only whitelist each specific iteration and not the general pattern. When we turn on the firewall any field that hasn’t been touched yet will trigger the whitelist popup box. We are trying to figure out how we can create a more general whitelist rule either by using a regex query or some other approach. What are our options for something like this?
This is what the parameters logged look like:
request.body[acf][field_580961289ffcd][row-1][field_580961529ffce]
request.body[acf][field_580961289ffcd][row-2][field_580961529ffce]
request.body[acf][field_580961289ffcd][row-3][field_58096421d49e9][row-2][field_5809705868a5f]
etc…Is there a way to whitelist any requests that has [acf] starting in the body?
Thank you for your help!
Josh
- The topic ‘Whitelist ACF ajax requests with regex’ is closed to new replies.