PHPackages                             pantheon-systems/smart\_content\_cdn - 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. pantheon-systems/smart\_content\_cdn

AbandonedArchivedDrupal-module

pantheon-systems/smart\_content\_cdn
====================================

Edge Integrations for Drupal on Pantheon's platform.

1.0.0(3y ago)45001[2 issues](https://github.com/pantheon-systems/smart_content_cdn/issues)[1 PRs](https://github.com/pantheon-systems/smart_content_cdn/pulls)MITPHP

Since Feb 24Pushed 2y ago12 watchersCompare

[ Source](https://github.com/pantheon-systems/smart_content_cdn)[ Packagist](https://packagist.org/packages/pantheon-systems/smart_content_cdn)[ RSS](/packages/pantheon-systems-smart-content-cdn/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (4)Versions (13)Used By (0)

Smart Content CDN
=================

[](#smart-content-cdn)

Moved to [Drupal.org Smart Content CDN](https://www.drupal.org/project/smart_content_cdn).

[![Unsupported](https://camo.githubusercontent.com/8380c198a4c03beeb4e4c01f7d480538225dab98c14d3aefcc9f3747f94958cb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70616e7468656f6e2d756e737570706f727465642d79656c6c6f773f6c6f676f3d70616e7468656f6e26636f6c6f723d464644433238)](https://pantheon.io/docs/oss-support-levels#unsupported) [![Build Status](https://github.com/pantheon-systems/smart_content_cdn/actions/workflows/main.yml/badge.svg)](https://github.com/pantheon-systems/smart_content_cdn/actions/workflows/main.yml/badge.svg) [![Package Version](https://camo.githubusercontent.com/d580255d0f30b51cea60f237549142dd60dd28303043bc3281105b187cda8b61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e7468656f6e2d73797374656d732f736d6172745f636f6e74656e745f63646e)](https://camo.githubusercontent.com/d580255d0f30b51cea60f237549142dd60dd28303043bc3281105b187cda8b61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e7468656f6e2d73797374656d732f736d6172745f636f6e74656e745f63646e)

Drupal module that extends [`smart_content`](https://www.drupal.org/project/smart_content) to support Pantheon Edge Integrations and personalization features.

Installation
------------

[](#installation)

We recommend using Composer to install this module. In your project root, run:

```
composer require pantheon-systems/smart_content_cdn

```

This will install the Smart Content module, Smart Content CDN and [`pantheon-systems/pantheon-edge-integrations`](https://github.com/pantheon-systems/pantheon-edge-integrations) -- a PHP library that is *required* by Smart Content CDN. Smart Content CDN will not function properly without the `pantheon-edge-integrations` library.

For detailed instructions on how to install and set up Smart Content CDN, see the [Edge Integration Guide](https://pantheon.io/docs/guides/edge-integrations).

API
---

[](#api)

It is possible to retrieve header information using Smart Content CDN within your own custom module. This can be used in any class context or procedural context in any hook.

1. Include the library with the `use` statement. ```
    use Pantheon\EI\HeaderData;
    ```
2. Use the snippet below to obtain the header data object ```
    // Get header data.
    $smart_content_cdn = new HeaderData();
    $p_obj = $smart_content_cdn->returnPersonalizationObject();
    ```

### Drupal Event Subscriber Vary Header

[](#drupal-event-subscriber-vary-header)

It is possible to set a Vary header within a Drupal Event Subscriber, giving the possibility of customizing content on a per-user basis.

```
/**
 * This method is called when the kernel.response is dispatched.
 *
 * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
 *   The dispatched event.
 */
public function onRespond(FilterResponseEvent $event) {
  $config = \Drupal::configFactory()->get('smart_content_cdn.config');

  // Check if Vary Header should be set.
  if ($config->get('set_vary') ?? TRUE) {
    $response = $event->getResponse();

    // Header keys to add to Vary header.
    $vary_headers = ['Audience', 'Interest', 'Role'];

    // Retrieve and set vary header.
    $smart_content_cdn = new HeaderData();
    $response_vary_header = $smart_content_cdn->returnVaryHeader($vary_headers);
    $response->headers->add($response_vary_header);
  }
}
```

Integrations
------------

[](#integrations)

There are a few different ways to extend the capabilities of the Smart Content CDN module.

### Smart Content Preview

[](#smart-content-preview)

Use the [Smart Content Preview](https://www.drupal.org/project/smart_content_preview) to allow previewing different segments that you have set up.

### Smart Content SSR

[](#smart-content-ssr)

The [Smart Content SSR](https://www.drupal.org/project/smart_content_ssr) module adds a server-side rendering Decision block, based on the Decision block that the Smart Content module provides. Use this if you're looking to improve speed on the site, along with consistency.

Tests &amp; Linting
-------------------

[](#tests--linting)

This module runs [PHPUnit](https://phpunit.de/) tests and [PHP\_CodeSniffer](https://phpcs.de/) linting via the [Drupal Coder](https://www.drupal.org/project/coder) package.

PHPUnit tests can be run with Composer with the `composer test:unit` command. Additional tests can be added with the same `test:` prefix and added to the `composer test` command.

PHPCS linting can be run with Composer with the `composer lint:php` command. The `phpcbf` command can be used to automatically fix linting errors by running `composer lint:phpcbf`. Additional linting (e.g. ESLint) can be added with the same `lint:` prefix and added to the `composer lint` command.

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 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

Every ~37 days

Recently: every ~42 days

Total

6

Last Release

1289d ago

Major Versions

0.3.0 → 1.0.02022-09-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a89f5f15357797cbd6ec7833a28626478ae3c0ceb5fa1faa8a26d0960584c65?d=identicon)[pantheon-systems](/maintainers/pantheon-systems)

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

---

Top Contributors

[![kmjacobs](https://avatars.githubusercontent.com/u/4055094?v=4)](https://github.com/kmjacobs "kmjacobs (86 commits)")[![enotick](https://avatars.githubusercontent.com/u/5909513?v=4)](https://github.com/enotick "enotick (49 commits)")[![jazzsequence](https://avatars.githubusercontent.com/u/991511?v=4)](https://github.com/jazzsequence "jazzsequence (46 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pantheon-systems-smart-content-cdn/health.svg)

```
[![Health](https://phpackages.com/badges/pantheon-systems-smart-content-cdn/health.svg)](https://phpackages.com/packages/pantheon-systems-smart-content-cdn)
```

PHPackages © 2026

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