Rewrites all links for assets to use a cdn instead
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_config
code
.editorconfig
.scrutinizer.yml
LICENSE
README.md
composer.json

README.md

silverstripe-cdnrewrite

Scrutinizer Code Quality

Rewrites all links for assets to use a cdn instead. It's not responsible to upload or sync the files anywhere. Some CDNs can do this for you.

Requirements

Installation

Download and install manually or use composer.

Configuration

You have to enable this filter manually using CDNRewriteRequestFilter.cdn_rewrite config var. Also define CDNRewriteRequestFilter.cdn_domain with protocol and host.

Your config.yml might look like:

CDNRewriteRequestFilter:
  cdn_rewrite: true #global switch
  cdn_domain: 'http://cdn.mydomain.com'
  rewrite_assets: true  #rewrite stuff in assets
  rewrite_themes: false #do not rewrite stuff in themes folder