Skip to content

Cloudflare and Bunny

Tlapiani runs at the origin, inside Caddy. Cloudflare, Bunny, and similar CDNs run at the edge. This page separates what you can do today from what is still planned.

Run Tlapiani behind Cloudflare or Bunny as a second layer. The module works in this setup without any extra code.

  • Build Caddy with Tlapiani and place it behind the CDN. See Install.
  • Configure trusted proxies in Caddy yourself. For example, handle CF-Connecting-IP in your own Caddy configuration if you need the real client IP for logging or routing.

That is the full extent of the current phase. There is no CDN-specific code in the module.

None of the following exists in the module today. All of it is planned, not built:

  • Honor the real client IP only from known CDN ranges.
  • Avoid a double challenge or captcha between the edge and Tlapiani.
  • Push blocks to the edge firewall through the CDN API.
  • Lock down the origin so it is reachable only from the CDN.
  • Correlate logs with CDN request IDs, such as cf-ray.

Without these integrations, a CDN and a WAF at the origin can challenge the same request twice, or the WAF can see the CDN edge IP instead of the real client. The planned work addresses both cases. Until then, plan your own trusted-proxy setup.

See Roadmap for the full list of planned features.