So – wanted to remind myself of not doing this dumb error again.
You have the following:
- A WordPress site
- Cloudflare plugin
- Pagerule setup in Cloudflare to cache ALL (All objects)
I can see the adminbar even though Im not logged in. Also see admin comments and so on. What happens is that the Cache all rule messes things up. It caches the adminbar and serves it even though you are not logged in.
It does not mean the user has access! User comes to login screen when trying to enter. But it still looks unprofessional….
How to solve it
Tried to rewrite the rule – didnt work – Still had the cache
According to Cloudflare support the plugin should manage it automatically – but not when page rules are active. Disabled pagerules. No adminbar. But also slower.
Solved it by running a local cache plugin AND using the cloudflare RAILGUN option instead as my provider supported it. Similar speeds – no caching problem. Also removed images and what not that in essance are useless anyways. Dumped Cloudflare plugin.