Configuration
The following sections guide you on configuring the CDN Helper module.
Integration with CDN
Integrating with your CDN is determined by your specific CDN type.
Update CDN cache configuration class
To use CDN extra header caching, add the class
property under /modules/cache/config/contentCaching/defaultPageCache
with the value info.magnolia.cdn.cache.CDNExtraHeaderCachingConfiguration
as shown here:
CDN cache policy
Define a CDN cache policy by adding cdnCachePolicy
in /modules/cache/config/contentCaching/defaultPageCache
right after the browserCachePolicy
node.
Sample configuration
'cdnCachePolicy':
'class': 'info.magnolia.cdn.cache.cdncachepolicy.CDNCachePolicySet' (1)
'policies':
'default':
'class': 'info.magnolia.cdn.cache.cdncachepolicy.ExtraHeaders'
'voters':
'sampleVoter':
'class': 'info.magnolia.voting.voters.URIStartsWithVoter'
'pattern': '/example/'
'extraHeaders':
'header1': 'sampleValue'
'header2': 'sampleValue'
1 | You can config non cache policy by using the class, info.magnolia.cdn.cache.cdncachepolicy.Never . |