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.

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 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

Development

License

MIT, see LICENSE.md.


All versions of pimcore-cdn with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
ext-json Version *
pimcore/pimcore Version ^2026.2
guzzlehttp/guzzle Version ^7.0
psr/log Version ^3.0
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 cors/pimcore-cdn contains the following files

Loading the files please wait ...