superrb / kunstmaan-cdn
为 Kunstmaan Bundles 选择的 CDN 集成
1.1.1
2021-11-12 11:18 UTC
Requires
- gpenverne/cloudflare-bundle: ^2.2
- guzzlehttp/guzzle: ^6.4
- symfony/console: ^4.4|^5.3
This package is auto-updated.
Last update: 2024-09-12 17:44:43 UTC
README
允许与多种内容分发网络集成
当前支持
- 缓存清理
- Cloudflare https://www.cloudflare.com
- KeyCDN https://www.keycdn.com
安装
步骤 1:安装捆绑包
composer require superrb/kunstmaan-cdn
将以下内容添加到 config/bundles.php
Superrb\KunstmaanAddonsBundle\SuperrbKunstmaanCdnBundle::class => ['all' => true],
步骤 2:添加环境变量
将以下内容添加到您的 .env
###> superrb/kunstmaan-cdn ### CLOUDFLARE_API_TOKEN= CLOUDFLARE_ZONE_ID= KEYCDN_API_KEY= KEYCDN_ZONE_ID= CDN_PROVIDER= ###< superrb/kunstmaan-cdn ###
然后您可以在 .env.local
中配置您首选的 CDN,例如配置 Cloudflare
###> superrb/kunstmaan-cdn ### CLOUDFLARE_API_TOKEN=<API_TOKEN> CLOUDFLARE_ZONE_ID=<ZONE_ID> CDN_PROVIDER=cloudflare ###< superrb/kunstmaan-cdn ###
使用方法
您可以清除您网站的缓存
$ bin/console cdn:cache:clear
问题和故障排除
所有问题: tech@superrb.com