Studio Developer Manual / Version 2110
Table Of ContentsStudio supports two types of preview services.
- Preview URL Provider: The preview provider delivers a ready to use preview URL, which will be displayed directly in the preview frame.
- Preview URL Service Provider: The preview provider delivers the URL to a (potentially external) preview URL service, which in turn delivers the real preview URL.
To configure one or more preview, the structure of the CMSettings document requires a structure similar to this:
- previews
An array of structs, where each entry defines exactly one preview.
- id
The ID of a preview (mandatory). The ID of a preview must be unique for all globally and site locally configured previews! The ID is also used as a localization key, if the displayName is missing.
- providerId
The ID of an existing preview provider (mandatory). The provider ID is the bean name of a server side preview provider implementation, provided by means of Spring Boot. CoreMedia comes with several preview providers 'out of the box', covering already many requirements of a preview. For details about these providers, please refer to the sections below.
- displayName
The name for the preview, to be displayed in the preview selection menu. Though the name is neither mandatory nor must be unique, he should be choosen carefully. To give an example, previews, restricted to a site, may use an abreviated site name, while global previews may use a more common preview name.
- enabled
Boolean flag to en- or disable a preview. Defaults to false, if missing!
- userGroupAllowList
An array of strings, containing usergroup names who are permitted to use this preview. If empty or missing, all Studio users are eligable to use this preview.
- previewUrlAllowList
An array of strings, containing endorsed URLs for the preview additionally to those, delivered automatically by the preview providers. This is list is merged with all other endorsed URLs of all configured previews, preview providers and of application properties, in order to control the URLs in the preview frame and prevent CSRF.
- connectSrcAllowList
An array of strings, containing endorsed connect sources for Studio additionally to those, delivered automatically by the preview providers. This list is merged with all other endorsed connect sources of all configured previews, preview providers and of application properties.
- urlTransformationsDisabled
Boolean flag to en- or disable the transformation of the preview URL by the Studio client (in most cases the addition of further query parameters for preview date, selected persona etc.). Note that these transformations are always enabled for a preview service URL (see section Section 9.32.7, “Generic Preview URL Service Provider” below). This flag decides on the enablement of transformations for the final preview URL.
- config
A struct containing preview provider specific configuration values.