DorsetDigital\CDNRewrite\CDNMiddleware
Synopsis
class CDNMiddleware
implements
HTTPMiddleware
{
- // members
- private static bool $cdn_rewrite = false;
- private static string $cdn_domain = '';
- private static bool $enable_in_dev = false;
- private static bool $add_debug_headers = false;
- private static string $subdirectory = '';
- private static boolean $add_prefetch = false;
- private static array $rewrites = ;
- // methods
- public process()
- private bool canRun()
- private void rewriteTags()
- private void addPrefetch()
- private void getSubdirectory()
- private void getPrefetchTag()
- private bool getIsAdmin()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Implements
- SilverStripe\Control\Middleware\HTTPMiddleware
Members
private
- $add_debug_headers — DorsetDigital\CDNRewrite\bool
- $add_prefetch — boolean
- $cdn_domain — string
- $cdn_rewrite — DorsetDigital\CDNRewrite\bool
- $enable_in_dev — DorsetDigital\CDNRewrite\bool
- $rewrites — array
- $subdirectory — string
Methods
private
- addPrefetch()
- canRun() — Check if we're OK to execute
- getIsAdmin() — Determine whether the website is being viewed from an admin protected area or not (shamelessly based on https://github.com/silverstripe/silverstripe-subsites)
- getPrefetchTag()
- getSubdirectory()
- rewriteTags() — Rewrite all the tags we need
public
- process() — Process the request