Skip to main content

Configure the DAM connector in Sitecore in a container environment

Abstract

How to configure a connection between Sitecore and Sitecore DAM in the Sitecore Connect for Content Hub connector in a container environment

When you have installed the Sitecore Connect for Content Hub (SCCH) connector in your Sitecore container environment, either in Docker or in Azure Kubernetes services, you must configure a connection from your Sitecore instance to the Sitecore DAM part of SCCH.

To configure a DAM connection:

  • In the root folder (by default, wwwroot), open the web.config file. Make sure the URL of the Content Hub instance (for example, content-hub-url.stylelabs.com), other delivery hostnames (for example, content-hub-url-delivery.stylelabs.cloud), and generated public links (for example, content-hub-url.stylelabs.com:8686) are added as sources to the Content-Security-Policy tag. For example:

    <add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://apps.sitecore.net;
        img-src 'self' data https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;
        style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
        font-src 'self' 'unsafe-inline' https://fonts.gstatic.com;
        upgrade-insecure-requests; block-all-mixed-content;
        child-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;
        connect-src 'self' https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;
        media-src https://content-hub-url.stylelabs.com/ https://content-hub-url-delivery.stylelabs.cloud/;" />

Note

In Content Hub, you can configure different delivery hostnames for public links by using the AssetExtensionDataConfigurationSetting setting.

If you have configured different hostnames, you must add all the hostnames as sources. You do this in the Content-Security-Policy parameter, in the img-src, child-src and connect-src properties.