DFS 11.1 - 3 Setting up Sitecore
3.1 Changes to web.config
Open your Sitecore's web.config file. Before you start making changes, it is advised that you make a copy of the web.config file, so you always will have the ability to fully recover.
3.1.1 Add handler
DFS has its own handler for serving media files. To enable the handler:
Navigate to the section "/configuration/system.webServer/handlers".
Now add the following handler, inside the handlers section.
<add name="MediaHandler" verb="GET" path="dfsmedia/*/*-*" type="DFS.Client.Services.Handlers.MediaHandler"/>
3.1.2 Content-Security-Policy
Our embedded Media Manager that are loaded in an IFrame must be added to the content security policy. Otherwise you will see a “This content is blocked” when opening the Media Manager or download asserts from the Media Manager.
Navigate to the section location/system.webServer/httpProtocol/customHeaders
Locate the header Content-Security-Policy, you must add all the Media Manager portal urls and the DAM api urls to the default-src. (Be aware that Digizuite can be configured with multiple portal and api urls, these urls can be received from your Digizuite consultant).
Example, here we added https://mm.example.com and https://api.example.com.
<add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval' https://mm.example.com https://api.example.com; img-src 'self' data: https://s.gravatar.com https://*.wp.com/cdn.auth0.com/avatars; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' 'unsafe-inline' https://fonts.gstatic.com; upgrade-insecure-requests;" />
3.2 Setting up the connection to Digizuite™
DFS synchronizes data from Digizuite™ DAM Center (DC) into Sitecore. Data is stored in a silo (item bucket). Before we can begin synchronizing, we have to fill out some config parameters telling Sitecore which DAM to fetch data from. There are 3 parameters in this file \App_Config\Include\damforsitecore\DFS.Settings.config.
<setting name="DFS.Digizuite.MediaManagerUrl" value="{URL TO MEDIA MANAGER}" />
<setting name="DFS.Digizuite.Sync.Username" value="{USERNAME OF THE SYNC USER}" />
<setting name="DFS.Digizuite.Sync.Password" value="{PASSWORD OF THE SYNC USER}" />
We do not recommend that you change these parameters in this file. Instead create a new config file where you patch the parameters (This is best practice). Here is an example of the patch config file. It is important that the file is loaded after DFS.Settings.config, otherwise the patch file won't have any effect. If you name the config file z.DFS.Settings.config and place it in the folder \App_Config\Include\damforsitecore\ you should be safe.
Edit the values in the file to match your site (use the below table):
Variable | Description |
---|---|
DFS.Digizuite.MediaManagerUrl | URL to your Media Manager |
DFS.Digizuite.Sync.Username | The username of the user to synchronize assets in the background |
DFS.Digizuite.Sync.Password | The password of the user to synchronize assets in the background |
Reload the site.
Table of Contents