smile / ez-cdn-bundle
为 EZPublish 5.x 的 CDN 后置替换
1.0.8
2017-02-05 19:01 UTC
Requires
- php: ~5.6|~7.0
- ezsystems/ezpublish-kernel: ~6.7
README
此插件旨在替换或添加 CDN 域名到网页提供的特定资源
安装
使用 composer 获取插件
从您的 eZPlatform 项目根目录终端运行此命令添加 SmileEzCDNBundle
composer require smile/ez-cdn-bundle
启用插件
要开始使用此插件,请在其应用程序的内核类中注册该插件
// ezpublish/EzPublishKernel.php public function registerBundles() { $bundles = array( // ... new Smile\EzCDNBundle\SmileEzCDNBundle(), // ... ); }
注意 Apache 配置,当字体(eot、woff ...)通过 css 服务器,或使用 javascript 进行 ajax/cookie 操作时。请参阅:http://www.w3.org/TR/cors/
配置插件
# ezpublish/config/config.yml smile_ez_cdn: system: acme_group: #for each siteaccess domain: domain.tld #required, delare your CDN domain extensions: [png, css] # list of resource extension that would be serve by your CDN