A free add-on for Concrete CMS 9.5 that makes a site behind Cloudflare see each visitor's real address, so editors stop being logged out on every save. It fills in Concrete's own Trusted Proxies setting with Cloudflare's published ranges, keeps the list current on a schedule, and shows you whether the fix is working. MIT licensed. No root needed, nothing to configure.
Download
Download Cloudflare Real IP 0.9.0
c5studio_cloudflare-0.9.0.zip · 35 KB · MIT · Concrete CMS 9.5.0+
Concrete drops a session when the visitor's IP address changes between requests. Behind Cloudflare's proxy, every request reaches the server from a different Cloudflare edge address, so the first Dashboard save bounces to the login page and logging in again fails with "Invalid form token". Concrete already has the setting that fixes this, under System & Settings → Permissions & Access → Trusted Proxies. Filling it in by hand means pasting 22 ranges, ticking the right two headers, and remembering to come back when Cloudflare changes the list.
X-Forwarded-For and X-Forwarded-Proto headers Cloudflare sends. It writes to the same place the core's Trusted Proxies page does, so that page shows exactly what is trusted and you can still add your own.concrete task:cloudflare-refresh-ranges.CF-Connecting-IP header), Not working with the reason, or Not behind Cloudflare. That page replaces reading the access log.A refresh that comes back empty, malformed, or missing more than half the ranges is refused and the previous list stays. The add-on ships with a copy of the list and the date it was taken, so it works before the first refresh and on a server with no outbound access.
Drop the c5studio_cloudflare folder into packages/, then install it under Extend Concrete in the Dashboard, or from the command line:
./vendor/bin/concrete c5:package:install c5studio_cloudflare
Installing applies the list straight away. Then open System & Settings → Permissions & Access → Cloudflare Real IP from the proxied domain and check that it says Working.
Uninstalling removes the ranges the add-on added and nothing else. Ranges you added yourself stay, and so do the header flags while any range remains. If nothing is left, the setting is cleared.
An Nginx real_ip rule does the same job one layer earlier and for every application on the box. The self-hosting guide has the rule. The add-on is for the more common case where you do not have root, or would rather not edit Nginx, and its status page is useful either way: with the Nginx rule in place it reports that the web server restored the address.
The concretecms/cloudflare_proxy package from 2017 solved the same problem by setting the proxies at runtime from a command-line tool. It was never published to the marketplace and has not been released since. This add-on takes the Dashboard route instead: it writes to the core setting so the Trusted Proxies page stays the source of truth, adds the scheduled refresh and the status check, and is being submitted to the marketplace. The version number stays at 0.9 until that review finishes; the package itself is complete.