Download the PHP package swordfox/silverstripe-cdnrewrite-plus without Composer
On this page you can find all versions of the php package swordfox/silverstripe-cdnrewrite-plus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download swordfox/silverstripe-cdnrewrite-plus
More information about swordfox/silverstripe-cdnrewrite-plus
Files in swordfox/silverstripe-cdnrewrite-plus
Download swordfox/silverstripe-cdnrewrite-plus
More information about swordfox/silverstripe-cdnrewrite-plus
Files in swordfox/silverstripe-cdnrewrite-plus
Vendor swordfox
Package silverstripe-cdnrewrite-plus
Short Description Automatically rewrites the URLs of media and assets to use a CDN
License BSD-3-Clause
Homepage https://github.com/swordfox/silverstripe-cdnrewrite-plus
Package silverstripe-cdnrewrite-plus
Short Description Automatically rewrites the URLs of media and assets to use a CDN
License BSD-3-Clause
Homepage https://github.com/swordfox/silverstripe-cdnrewrite-plus
Keywords cdnsilverstripe
Please rate this library. Is it a good library?
Informations about the package silverstripe-cdnrewrite-plus
Silverstripe CDN Rewrite Plus
Provides a simple method of rewriting the URLs of assets and resources to allow the use of a subdomain or external CDN service
See the configuration notes below for an example of how to set this module up.
Requirements
- Silverstripe 6.x
- Silverstripe 5.x
- Silverstripe 4.x
Installation
- Install the code with
composer require swordfox/silverstripe-cdnrewrite-plus "^1" - Run a
dev/build?flushto update your project
Usage
The module won't make any changes to your site unless you do a bit of configuration. There are a few options you can set, done in a yml file:
The options are hopefully fairly self explanatory:
cdn_rewrite- globally enables and disables the module (default false - disabled)cdn_domain- the full domain name of the CDN (required to enable module)add_debug_headers- if enabled, adds extra HTML headers to show the various operations being applied (default false)enable_in_dev- enable the CDN in dev mode (default false)subdirectory- set this if your site is in a subdirectory (eg. for http://www.example.com/silverstripe - set this to 'silverstripe')add_prefetch- set this to true if you want the module to automatically add a<link rel="dns-prefetch">tag to your html head to improve performancerewritelinks- set this to false if your CDN does not support all file types e.g. PDFsrewritebgattr- rewrites background-image: url() paths assetprefix- adds a prefix to the assets directory for use on shared CDNS e.g.https://cdn.example.com/site-assets/image.jpgrewrites- this is a list of the prefixes you wish to rewrite. By default, CMS 4 exposes content in a _resources directory in the public structure, so you'll probably want that as a minimum. You can add as many additional entires here as required.
Notes
- The module is disabled in the CMS / admin system, so rewrites do not currently happen here
- When enabled, the module will always add an HTTP header of
X-CDN: Enabledto show that it's working, even if none of the other rewrite operations are carried out. If this is not present and you think it should be, ensure that you have setcdn_rewriteto true, that you have specified thecdn_domainin your config file and that you haveenable_in_devset to true if you are testing in dev mode.
Credits
- Complete copy of DorsetDigital's silverstripe-cdnrewrite with a few extra options.
All versions of silverstripe-cdnrewrite-plus with dependencies
PHP Build Version
Package Version
No informations.
The package swordfox/silverstripe-cdnrewrite-plus contains the following files
Loading the files please wait ...