Download the PHP package cors/pimcore-cdn without Composer
On this page you can find all versions of the php package cors/pimcore-cdn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cors/pimcore-cdn
More information about cors/pimcore-cdn
Files in cors/pimcore-cdn
Package pimcore-cdn
Short Description CORS - CDN providers for Pimcore's CDN integration (Cloudflare, Google Cloud CDN, AWS CloudFront, Azure Front Door)
License proprietary
Homepage https://www.cors.gmbh
Informations about the package pimcore-cdn
CORS Pimcore CDN (cors/pimcore-cdn)
Provider implementations for Pimcore's built-in CDN integration (Pimcore ≥ 2026.2):
Cloudflare, Google Cloud CDN, AWS CloudFront and Azure Front Door in one
bundle. Pimcore emits Surrogate-Key / Cache-Tag headers on thumbnail responses and
dispatches purge messages on asset and thumbnail-config changes; this bundle supplies the
Pimcore\Cdn\PurgeClientInterface implementations (and, for Cloudflare, an
ImageTransformAdapterInterface) that talk to the provider APIs.
See Pimcore's doc/08_Development_Details/03_Cache/03_CDN_Integration.md for the core
mechanics (tags, messenger transport pimcore_cdn_purge, pimcore:cdn:purge command).
Providers
CDN_PROVIDER |
Tag purge | URL purge | Image transform (CDN_IMAGE_OPTIMIZER) |
Extra dependency |
|---|---|---|---|---|
cloudflare |
yes | yes | cloudflare (/cdn-cgi/image/) |
– |
google |
yes | yes | – | google/auth |
aws |
yes (#tag items, needs CacheTagConfig) or via path mapping |
yes | – | aws/aws-sdk-php |
azure |
via path mapping | yes | – | – |
chain |
every provider in chain.providers |
yes | – | – |
Stacked CDNs (chain)
For setups with two CDN layers, e.g. Cloudflare in front of Azure Front Door, set
CDN_PROVIDER=chain and list the providers in cors_cdn.chain.providers. Every purge goes
to all of them, in the listed order. Put the layer closest to the origin first, otherwise the
outer CDN can refetch the stale object from the inner one before that is purged.
If one provider fails, the others still run; the first failure is re-thrown afterwards so
Messenger retries the message (re-purging the successful ones, which is harmless). Any
registered purge client works in a chain, including Pimcore's fastly. The Cache-Tag
header is rewritten to commas if any chained provider needs it.
Cache-Tag header
Pimcore writes Cache-Tag space-separated. Cloudflare, CloudFront and Cloud CDN read
comma-separated tags, so CacheTagHeaderRewriteListener rewrites the header for those
providers (priority -10, after Pimcore's listener). Surrogate-Key is left untouched.
Providers without cache tags
Azure Front Door has no cache tags, and CloudFront only has them when the distribution
carries a CacheTagConfig (set HeaderName to Cache-Tag; aws.tag_invalidation: false
switches to path mapping). For path-only purges TagToPathMapper translates Pimcore's tags:
| Tag | Path pattern |
|---|---|
asset-{id} |
{thumbnail prefix}{asset folder}/{id}/* (asset must still exist) |
asset-{id}-thumb-{config} |
…/{id}/image-thumb__{id}__{config}/* and video-thumb… |
thumb-{config} |
unmappable |
asset-path-{hash} |
unmappable (originals are URL-purged anyway) |
Unmappable tags are skipped with a warning, or with unmappable_tag_strategy: purge_all
collapsed into one /* invalidation. Deleted assets cannot be resolved, so their
thumbnails expire by TTL; the original is still purged by URL.
Installation
Enable CORS\Bundle\CdnBundle\CORSCdnBundle, set CDN_PROVIDER and CDN_BASE_URL, and
run a worker for the pimcore_cdn_purge transport.
Configuration
Google uses Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS or Workload
Identity) with the compute scope; the service account needs compute.urlMaps.invalidateCache.
AWS uses the default SDK credential chain and needs cloudfront:CreateInvalidation.
Azure uses an Entra ID app registration (client credentials) with the CDN Profile Contributor
role on the Front Door profile; resource_id is the ARM id of the AFD endpoint.
Google and AWS clients are only registered when google/auth respectively aws/aws-sdk-php
is installed.
Not yet verified against live APIs
- Cloudflare
trim.*crop options in the transform adapter. - Google's maximum number of
cacheTagsper request and invalidation rate limits. - Whether Azure Front Door honours partial-folder wildcards such as
/folder/42/*(documented is/folder/*); if not,asset-{id}purges on Azure needpurge_all.
Development
License
MIT, see LICENSE.md.
All versions of pimcore-cdn with dependencies
ext-json Version *
pimcore/pimcore Version ^2026.2
guzzlehttp/guzzle Version ^7.0
psr/log Version ^3.0