Download the PHP package innoweb/silverstripe-fastly without Composer

On this page you can find all versions of the php package innoweb/silverstripe-fastly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-fastly

Silverstripe Fastly integration

Version

Overview

Adds Fastly CDN integration to a Silverstripe Site.

Requirements

Note: this version is compatible with Silverstripe 5. For Silverstripe 4, please see the 2 release line.

Installation

Install the module using composer:

Then run dev/build.

Configuration

Silverstripe

You need to add the following configuration to your environment:

Additionally, the following configuration options are available on the Fastly class:

Image surrogate keys

Because in Silverstripe 4 and 5 we still have no way of getting all image variants (see https://github.com/silverstripe/silverstripe-assets/issues/109), we need to mark all images and image variants with a Surrogate Key in order to purge them.

Because the filename of all image variants in SS 4.4+ have the variant hash to the original filename, e.g. my-file__FitWzYwLDYwXQ.jpg, we can extract the file name without hash and add it as a surrogate key header. The module then purges the original URL of the file as well as the Surrogate Key to clear the original image as well as all variants. (This might purge other images if there are multiple images with the same name in different folders, but I think we can live with that.)

For Apache, add the following snippet to your .htaccess file to add the surrogate key:

Fastly

Conditions

type: cache

title: not admin, logged in or form

type: request

title: admin or logged in

Request settings

Headers

VCL snippets

type: recv

title: clean up requests

type: fetch

title: remove cookie header from static content

type: deliver

title: remove session cookie for non-form pages

GEO fencing

To serve different content based on the user's location add the following VCL snippet to your Fastly configuration:

You can choose any or all of the lines above to add to your config, depending on what you need.

For continent and country codes, automatic VARY headers are added to all page requests. You can override this behaviour in your own page controllers using the updateVaryHeader method.

See https://developer.fastly.com/reference/vcl/variables/geolocation/ and https://developer.fastly.com/solutions/patterns/geofence/ for further information.

License

BSD 3-Clause License, see License


All versions of silverstripe-fastly with dependencies

PHP Build Version
Package Version
Requires silverstripe/vendor-plugin Version ^2
silverstripe/cms Version ^5
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package innoweb/silverstripe-fastly contains the following files

Loading the files please wait ....