wernerkrauss/cdnrewrite

Rewrites all links for assets to use a cdn instead

Installs: 2 375

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 3

Forks: 4

Open Issues: 3

Type:silverstripe-module

0.0.3 2015-08-18 09:50 UTC

This package is auto-updated.

Last update: 2024-12-21 22:23:23 UTC


README

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