PHPackages                             dksdev01/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. dksdev01/cloudflare

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

dksdev01/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(9mo ago)08.6k↑33.3%GPL-2.0-or-laterPHP

Since Sep 18Pushed 9mo agoCompare

[ Source](https://github.com/dksdev01/cloudflare)[ Packagist](https://packagist.org/packages/dksdev01/cloudflare)[ Docs](https://www.drupal.org/project/cloudflare)[ RSS](/packages/dksdev01-cloudflare/feed)WikiDiscussions 2.0.x Synced 2d 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](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

30

—

LowBetter than 62% of packages

Maintenance56

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity20

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

288d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8261dd05f612ab3ad667582d04b15f1a467589767d84f171282ac6ea7c013b6?d=identicon)[dksdev01](/maintainers/dksdev01)

---

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)")[![RoSk0](https://avatars.githubusercontent.com/u/119257?v=4)](https://github.com/RoSk0 "RoSk0 (5 commits)")[![jcnventura](https://avatars.githubusercontent.com/u/329663?v=4)](https://github.com/jcnventura "jcnventura (5 commits)")[![vijaycs85](https://avatars.githubusercontent.com/u/1220029?v=4)](https://github.com/vijaycs85 "vijaycs85 (5 commits)")[![wimleers](https://avatars.githubusercontent.com/u/14240?v=4)](https://github.com/wimleers "wimleers (4 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)")[![chandravilas01](https://avatars.githubusercontent.com/u/41626181?v=4)](https://github.com/chandravilas01 "chandravilas01 (1 commits)")[![victorcpereira](https://avatars.githubusercontent.com/u/8820928?v=4)](https://github.com/victorcpereira "victorcpereira (1 commits)")[![kentr](https://avatars.githubusercontent.com/u/151052?v=4)](https://github.com/kentr "kentr (1 commits)")[![dksdev01](https://avatars.githubusercontent.com/u/19617912?v=4)](https://github.com/dksdev01 "dksdev01 (1 commits)")

---

Tags

drupalcloudflareCloud Flarecdn

### Embed Badge

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

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

###  Alternatives

[vectorface/whip

A PHP class for retrieving accurate IP address information for the client.

3781.1M14](/packages/vectorface-whip)[lullabot/amp

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

3793.0M11](/packages/lullabot-amp)[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3413.0M5](/packages/monicahq-laravel-cloudflare)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M564](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1465.4M62](/packages/mnsami-composer-custom-directory-installer)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)

PHPackages © 2026

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