Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

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

Started by Norbert 2 years ago · 0 replies · 499 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 Hanns Mattes, 5 days ago
0 85 5 days ago
General · by Dima, 1 week ago
1 113 1 week ago
General · by pamtbaau, 2 weeks ago
0 186 2 weeks ago
General · by lynbor, 2 months ago
5 694 3 weeks ago
General · by Andy Miller, 1 month ago
0 417 1 month ago