Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by Norbert 1 year ago · 0 replies · 319 views
1 year 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 jeremycherfas, 4 days ago
3 92 9 minutes ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago