Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Cloudflare and Grav Admin Issues: logout problem and slow panel performance

Started by Norbert 2 years ago · 0 replies · 375 views
2 years ago

I am experiencing issues with integrating Cloudflare and CMS Grav. After enabling Cloudflare and configuring cache rules (Cache Rules), I have noticed two main problems in the admin panel (/admin):

After clicking "Log out," I get the message "You have been logged out", but the admin panel remains visible. I am not sure if this is a cache issue or a problem with Grav sessions.

The admin panel and its subpages, as well as actions like saving pages, are significantly slower compared to before configuring Cloudflare. I suspect that Cloudflare is acting as an intermediary and causing delays.

Current Cloudflare Cache Rules Configuration:

TXT
Cache Everything (Template)
(http.host contains "example.com")
→ Caches the entire site, including static assets.

Bypass Cache for Admin
(starts_with(http.request.uri.path, "/admin"))
→ Should disable caching for /admin and its subpages.

Bypass Cache on Cookie (Template)
(starts_with(http.cookie, "grav-site"))
→ Should bypass cache if the user has a Grav session.

Additional Information (cf-cache-status headers). For public site subpages (example.com/*), the response header is:
cf-cache-status: HIT

For the admin panel (example.com/admin/*), the response header is:
cf-cache-status: DYNAMIC
(Cloudflare is not caching, but it is still acting as an intermediary.)

Suggested topics

Topic Participants Replies Views Activity
General · by lynbor, 3 weeks ago
3 352 3 days ago
General · by lynbor, 1 week ago
7 386 3 days ago
General · by Harry, 3 days ago
0 83 3 days ago
General · by Old Man Umby, 3 weeks ago
2 256 2 weeks ago
General · by jeremycherfas, 3 weeks ago
5 374 2 weeks ago