Skip to content

Instantly share code, notes, and snippets.

@jordanrobinson
Last active April 1, 2019 15:56
Show Gist options
  • Save jordanrobinson/ebb54f0551f0dde08fc1d27abe4e2466 to your computer and use it in GitHub Desktop.
Save jordanrobinson/ebb54f0551f0dde08fc1d27abe4e2466 to your computer and use it in GitHub Desktop.
CDN.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role/"
xmlns:env="http://www.sitecore.net/xmlconfig/env/">
<sitecore>
<mediaLibrary>
<mediaProvider>
<patch:attribute name="type">Foundation.Caching.Providers.CDNMediaProvider, Foundation.Sitecore</patch:attribute>
</mediaProvider>
</mediaLibrary>
<settings role:require="ContentDelivery">
<setting name="Media.MediaLinkServerUrl" env:require="your-cool-environment">
<patch:attribute name="value">//your-awesome.cdn.url</patch:attribute>
</setting>
<setting name="MediaResponse.Cacheability">
<patch:attribute name="value">public</patch:attribute>
</setting>
<setting name="Media.AlwaysIncludeServerUrl">
<patch:attribute name="value">true</patch:attribute>
</setting>
</settings>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment