Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

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

Started by Norbert 1 year ago · 0 replies · 74 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 Jerry Hunt, 3 days ago
2 67 3 hours ago
General · by pamtbaau, 8 hours ago
1 44 8 hours ago
General · by Andy Miller, 20 hours ago
0 40 20 hours ago
General · by Marcel, 12 months ago
6 341 4 days ago
General · by Duc , 5 days ago
3 35 5 days ago