I’m using CloudFlare on a WordPress install (hosted w/ WPEngine).
Using a custom worker, I’m attempting to cache certain requests sent through to a series of custom endpoints set up using the WordPress REST API. These are GET requests and the response is JSON.
Cloudflare is properly caching the requests, however, I’m having issues w/ clearing them. A purge of everything works properly and I see the cf-cache-status header change as expected.
A custom purge using the request url (e.g. https://www.mysite.com/wp-json/some-endpoint/&url=some-encoded-value), however, does not work (custom purges to other non REST API URLs work as expected).
Specifically, it appears that ‘wp-json’ in the path is causing the issue. If I alter the path (e.g. wp_json), I’m able to perform a custom purge w/ the new altered url/cachekey.
I assumed maybe it was related to WAF, but nothing shows up in the logs and disabling the firewall completely (this is in a staging environment) does not fix the issue.
Any ideas?
Thanks!