Download cdn-8.x-3.1.tar.gztar.gz 33.94 KB
MD5: 43ca4ab22bfa696c35a9470268cc518f
SHA-1: 1d2ef7aa7264611fdc6651ba1b98d1ee4e2c9dfa
SHA-256: 4f3d9f76a52c98619a7c89ce49c7fb0ab5aa7c775b075d9ce70abf65ccc825b5
Download cdn-8.x-3.1.zipzip 51.44 KB
MD5: 6827082652b0ef28ebb5e4a27f93b8bd
SHA-1: 0ffbaebd369e7a0ad669d77eb46b319899a3a694
SHA-256: 13c45b1f0dbbeb16913a4a15fe25996d0253fa75a1b0fd9fd72bf6ec6734d581
Install with Composer: $ composer require 'drupal/cdn:^3.1'
Using Composer to manage Drupal site dependencies

Release info

Created by: Wim Leers
Created on: 9 Jul 2017 at 14:20 UTC
Last updated: 2 Dec 2017 at 11:03 UTC
Core compatibility: 8.x
Release type: Bug fixes, New features

Release notes

The first stable release (8.x-3.0) was released just over 8 months ago. Zero bugs have been reported! In this release:

  1. 2 new minor features: Cache-Control: immutable (#2838309: Make "Forever cacheable files" use `Cache-Control: immutable`) and rel="preconnect" (#2874594: Support for rel="preconnect"), both of which are new upcoming web standards! (See and, respectively.)
  2. "bugfixes": one trivial PHP notice and minor test coverage problems

The 8.x-3.0 release notes:

The CDN module is fully ported to Drupal 8. It is much simpler to use (just look at the UI). It has less overhead (the UI is in a separate module, the altering of file URLs has far simpler logic). It has lower technical complexity (File Conveyor support was dropped, it no longer needs to detect HTTP vs HTTPS: it always uses protocol-relative URLs, less unnecessary configurability, the farfuture functionality no longer tries to generate file and no longer has extremely detailed configurability).

In other words: the CDN module in Drupal 8 is much simpler. And has much better test coverage too. (You can see this in the tarball size too: it's about half of the Drupal 7 version of the module, despite significantly more test coverage!)

The CDN UI module's configuration UI.

all the fundamentals
  • the ability to use simple CDN mappings, including conditional ones depending on file extensions, auto-balancing, and complex combinations of all of the above
  • DNS prefetching
  • a simple UI to set it up — in fact, much simpler than before!
  1. the CDN module now always uses protocol-relative URLs, which means there's no more need to distinguish between HTTP and HTTPS, which simplifies a lot
  2. the UI is now a separate module (fixes #1784432: Version 3.0: move UI of CDN module into a cdn_ui module)
  3. the UI is optional: for power users there is a sensible configuration structure with strict config schema validation
  4. complete unit test coverage of the heart of the CDN module, thanks to D8's improved architecture
  5. DNS prefetching using headers rather than tags in <head>, which allows me to use a much simpler/cleaner Symfony response subscriber
  6. tours instead of advanced help (fixes #1753174: Dependency for advanced_help module), which very often was ignored
  7. there is nothing to configure for the SEO (duplicate content prevention) feature anymore
  8. nor is there anything to configure for the Forever cacheable files feature anymore (named Far Future expiration in Drupal 7), and it's a lot more robust
  1. File Conveyor support
  2. separate HTTPS mapping (also mentioned above)
  3. all the exceptions (blacklist, whitelist, based on Drupal path, file path…) — all of them are a maintenance/debugging/cacheability nightmare
  4. configurability of SEO feature
  5. configurability of unique file identifiers for the Forever cacheable files feature
  6. testing mode

Changes since 8.x-3.0:

(Better commit/issue list to follow once #2828769: Impossible to install Git Release Notes for Drush (grn) via composer is fixed.)

* 9beea3e - (HEAD -> 8.x-3.x, tag: 8.x-3.1, origin/8.x-3.x) Issue #2874594 by Wim Leers: Support for rel="preconnect" (7 minutes ago) <wimleers>
* 5771d48 - Issue #2874178 by Wim Leers: Update README to warn that when using Amazon CloudFront, query forwarding must be enabled (10 minutes ago) <wimleers>
* d2f62e2 - Issue #2838309 by Wim Leers: Make "Forever cacheable files" use `Cache-Control: immutable` (14 minutes ago) <wimleers>
* 771a109 - Issue #2891162 by Wim Leers: Refactor: extract logic from FileUrlGenerator::generate() into a new ::getCdnDomain() method (9 days ago) <wimleers>
* 5b1858d - Issue #2855855 by Wim Leers, hitfactory: Notice: Undefined index: preprocess in cdn_file_url_alter() (3 months ago) <wimleers>
* 1feff60 - Issue #2871588 by Wim Leers: Remove api doc groups for updates, because core did the same (3 months ago) <wimleers>
* 6fb6706 - Issue #2870903 by bradjones1: Fix regex in CdnIntegrationTest.php (3 months ago) <bradjones1>
* 3fc1319 - Issue #2843092 by Wim Leers, Berdir: Since recent DrupalCI update, CDN 8.x-3.x is failing: CDN module's update path test assumes it's installed in /modules (6 months ago) <wimleers>


The selected release is the release that will be used for automated testing. Optional projects are only used for testing.


No required projects


No optional projects