Is Cloudflare breaking your REST API?


The worst problems are the ones that don’t leave you a clue for why they are happening. Such an one will cause much grief. No messages, warning, or errors. I like using plugins for WordPress, plain and simple, and as long as they aren’t hurting my page speed the more the merrier (If you need it). Plugins save the time of trying to figure out ways to do things that someone else has already figured out, and nine times out of nine, they do it better than I can anyhow. Some are just huge time savers.

One of my favorite time savers is a plugin by Jordy Meow called Media File Renamer Pro that does just what it says. It adds alt tags also. I run this on a lot of web sites and I was having an issue on some sites where I could change the plugin settings, and on others I couldn’t change any settings. There were no errors to tell me what was wrong. I disabled plugins, no change. I created a subdomain and installed a clean site with only the Media File Renamer plugin and the problem persisted. Super confusing!

Cache Deception Armor Content-Type Mismatch

All sites were on the same version of WordPress and Media File Renamer, so that only left one other variable that was different between sites and that difference was Cloudflare. I love Cloudflare, but they have features that can really cause trouble and it’s usually Rocket Loader™, but not this time. This time I had added a feature called “Cache Armor Deception” to my last page rule and that was breaking the WordPress REST API. I like tight security so Cache Deception Armor sounded like a good thing. Maybe for some sites and plugins, but not for some WordPress plugins if they aren’t written to handle content types properly. If your using Cache Deception Armor and anything in your site has a Content-Type mismatch, the asset will not be cached and can therefore behave very strangely, like some needed assets are missing in your requests. I hope I said that right so that it makes sense.
Anyhow, if you use Cloudflare with Cache Deception Armor and things seem broken, get rid of it ( Cache Deception Armor I mean ).

Resources


Definitive Guide to WordPress on Cloudflare Free

Understanding Cloudflare’s CDN

Cache Deception Armor Resources

Understanding Our Cache and the Web Cache Deception Attack
Web Cache Deception Attack revisited

Always Online (Also Breaks REST API)

Understanding Cloudflare Always Online

Rocket Loader™ Resources ( just in case )

Ditch Rocket Loader™ too.
(see also “What does Rocket Loader do?”) 

.

(Visited 1,139 times, 1 visits today)

Disclaimer

Technoogies.com has made every effort to ensure that the information provided is correct but is not advice. Technoogies will not accept any responsibility or liability for any errors or omissions. Technoogies Authors do not vouch for third party sites. Visit third party sites at your own risk. Technoogies is not directly partnered with any vendor or third party. This website uses cookies only for analytics and basic website functions. Technoogies does not accept any liability that might arise from accessing the data presented on this site. Links to internal pages promotes the content of Technoogies. This article does not constitute legal advice.

Disclosure of Affiliations

Technoogies.com is affiliated with Google, Amazon, and other advertisers. Running this site costs money and if it can’t sustain itself through ad's, it’ll go bye-bye. Please help me to keep that from happening with your patronage of ads that are of interest to you.

Technical Nuggets of Knowledge
Scroll to Top