PHPackages                             specbee/cloudflare - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. specbee/cloudflare

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

specbee/cloudflare
==================

Drupal module for interacting with CloudFlare's SDK. CloudFlare is a copyright of CloudFlare, Inc. The authors of this tool has no association with CloudFlare, Inc.

2.0.x-dev(1y ago)00GPL-2.0-or-laterPHP

Since Feb 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/malabya/cloudflare)[ Packagist](https://packagist.org/packages/specbee/cloudflare)[ Docs](https://www.drupal.org/project/cloudflare)[ RSS](/packages/specbee-cloudflare/feed)WikiDiscussions 2.0.x Synced 1mo ago

READMEChangelogDependencies (3)Versions (1)Used By (0)

CloudFlare
==========

[](#cloudflare)

The CloudFlare module provides integration with the CloudFlare CDN using the CloudFlare API see:

[![Build Status Images](https://camo.githubusercontent.com/13949deb6760d2f5052177dcfc31c2dead4596171f34e60b55e88d0278669dd8/68747470733a2f2f7472617669732d63692e6f72672f64382d636f6e747269622d6d6f64756c65732f636c6f7564666c6172652e737667)](https://camo.githubusercontent.com/13949deb6760d2f5052177dcfc31c2dead4596171f34e60b55e88d0278669dd8/68747470733a2f2f7472617669732d63692e6f72672f64382d636f6e747269622d6d6f64756c65732f636c6f7564666c6172652e737667)

Special thanks to Wim Leers and Niels Van Mourik for their collaboration and support on all things cache and purge!

Current Features
----------------

[](#current-features)

- Cache clearing by Path (Recommended For Free and Professional) and Tag (Enterprise).
- Restore client's original IP address.

Quick Start Instructions
------------------------

[](#quick-start-instructions)

- [Free Tier](https://github.com/d8-contrib-modules/cloudflare/blob/8.x-1.x/docs/freetier_setup.md)
- [Enterprise Tier](https://github.com/d8-contrib-modules/cloudflare/blob/8.x-1.x/docs/enterprise_setup.md)

Dependencies
------------

[](#dependencies)

- [CTools D8 Module](https://www.drupal.org/project/ctools)
- [Purge D8 Module](https://www.drupal.org/project/purge) (for purging)
- [URLs Queuer Module](https://www.drupal.org/project/purge_queuer_url) (for free tier or purging by URL only)
- [Cloudflare SDK](https://github.com/cloudflare/cloudflare-php) - The module relies on the Cloudflare SDK for all interactions with the CloudFlare API.

Support
-------

[](#support)

- Report bugs and request features in the [GitHub CloudFlare Issue Queue](https://github.com/d8-contrib-modules/cloudflare/issues).
- Use pull requests (PRs) to contribute to CloudFlare.

CloudFlare Free Tier vs Enterprise
----------------------------------

[](#cloudflare-free-tier-vs-enterprise)

- Only Enterprise plan supports cache tags.
- If you attempt to configure tag based purging on any other plan you will get HTTP 400 error codes in the error log.
- Free Tier don't have a vary by cookie, it is available only in Business and Enterprise plans. In English? That means if you login to your site then authenticated pages can get cached by the CDN. So anonymous users see what appear to be authenticated pages (they are not really authenticated). To work around we recommend that you setup a separate domain for authenticated users. e.g if your domain is `your_domain.com` then setup a second domain for authenticated users that bypasses cloudflare e.g `edit.your_domain.com`. In this setup block access to /user on your public domain via .htaccess rules.
- By default CloudFlare will cache static resources but not HTML. You need to add a page rule to cache all the things.

Cache Tags
----------

[](#cache-tags)

In D8 cache clearing is a whole new world. D8 introduces the concept of cache tags. Cache tags represent groupings of content that should be purged when content is created, updated or deleted. Most of this already happens behind the scenes so you don't need to rely on extensive rules like in D6/D7. See [here](https://www.drupal.org/developing/api/8/cache/tags)and [here](http://buytaert.net/making-drupal-8-fly) for more info on tags. This module has experimental support for Tags (it will still work with path based purging).

Note to those updating from earlier version
-------------------------------------------

[](#note-to-those-updating-from-earlier-version)

You will also need to update to the most recent version of the Purge module.

Gotcha's, Disclaimers, &amp; Technical Notes
--------------------------------------------

[](#gotchas-disclaimers--technical-notes)

To read more about different details, and gotchas [read more here.](https://github.com/d8-contrib-modules/cloudflare/blob/8.x-1.x/docs/disclaimers.md)

Running tests
-------------

[](#running-tests)

To run tests:

- composer install
- ./run-tests.sh

Legal
-----

[](#legal)

CloudFlare is a trademark of CloudFlare Inc. This module has not been built, maintained or supported by CloudFlare Inc. This is an open source project with no association with CloudFlare Inc. The module uses their API, that's all.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance43

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

446d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e03458424df4d0bce1b4747d78e0d7ad36da25e5d4923b565f0ab5627521f8b?d=identicon)[SpecbeeLabs](/maintainers/SpecbeeLabs)

---

Top Contributors

[![aweingarten](https://avatars.githubusercontent.com/u/6517820?v=4)](https://github.com/aweingarten "aweingarten (14 commits)")[![mandclu](https://avatars.githubusercontent.com/u/10761892?v=4)](https://github.com/mandclu "mandclu (8 commits)")[![vijaycs85](https://avatars.githubusercontent.com/u/1220029?v=4)](https://github.com/vijaycs85 "vijaycs85 (5 commits)")[![jcnventura](https://avatars.githubusercontent.com/u/329663?v=4)](https://github.com/jcnventura "jcnventura (5 commits)")[![wimleers](https://avatars.githubusercontent.com/u/14240?v=4)](https://github.com/wimleers "wimleers (4 commits)")[![RoSk0](https://avatars.githubusercontent.com/u/119257?v=4)](https://github.com/RoSk0 "RoSk0 (4 commits)")[![malabya](https://avatars.githubusercontent.com/u/4988240?v=4)](https://github.com/malabya "malabya (3 commits)")[![nerdstein](https://avatars.githubusercontent.com/u/966547?v=4)](https://github.com/nerdstein "nerdstein (2 commits)")[![balintpekker](https://avatars.githubusercontent.com/u/10480083?v=4)](https://github.com/balintpekker "balintpekker (2 commits)")[![kentr](https://avatars.githubusercontent.com/u/151052?v=4)](https://github.com/kentr "kentr (1 commits)")[![victorcpereira](https://avatars.githubusercontent.com/u/8820928?v=4)](https://github.com/victorcpereira "victorcpereira (1 commits)")

---

Tags

drupalcloudflareCloud Flarecdn

### Embed Badge

![Health badge](/badges/specbee-cloudflare/health.svg)

```
[![Health](https://phpackages.com/badges/specbee-cloudflare/health.svg)](https://phpackages.com/packages/specbee-cloudflare)
```

###  Alternatives

[lullabot/amp

A set of useful classes and utilities to convert html to AMP html (See https://www.ampproject.org/)

3802.9M10](/packages/lullabot-amp)[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[aleksip/plugin-data-transform

Data Transform Plugin for Pattern Lab PHP

34897.4k3](/packages/aleksip-plugin-data-transform)[cloudflare/cf-ip-rewrite

Library to rewrite CloudFlare IP Addresses to the end-user IP address

15752.7k5](/packages/cloudflare-cf-ip-rewrite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
