Reference - Configuration keys

In addition to the settings available in the Xperience administration, the system’s functionality can be adjusted via low-level application settings. These application settings are managed using ASP.NET Core configuration providers.

By default, Xperience projects contain an appsettings.json file for this purpose. Unless otherwise specified, Xperience application setting keys are added to the first level of the configuration hierarchy (i.e., directly under the root JSON object in the appsettings.json file).

The appsettings.json file also contains the database connection string.

The following configuration categories are available:

General settings

Key

Description

Default

CMSForbiddenURLValues

Specifies characters that are forbidden in page URLs (see content tree-based routing). Forbidden characters are automatically replaced by the character specified in the Forbidden characters replacement setting in Settings → URLs and SEO.

By default, the following characters are forbidden:

\/:*?"<>|&%.’#[]+=„“ and the space character.

If you add this key, its value overrides the default forbidden character set. You can either allow some of the forbidden characters or add new ones.

We recommend keeping the default characters forbidden, since they may prevent URLs from working correctly.

JSON


"CMSForbiddenURLValues": "$\\/:?&quot;&lt;&gt;|&amp;%.&apos;#[] ="

CMSHashStringSalt

Sets the salt value the system uses in hash functions, for example when creating macro signatures. If a specific hash salt value is not assigned during the installation of a new Xperience project, the key is set to a random GUID.

If you plan to deploy your project to the SaaS environment, use the hash salt value provided in Xperience Portal.

Note: Changing the hash salt on an instance with defined content may prevent macros from resolving correctly. If you encounter such problems, you must re-sign macros (the system then creates the hashes using the new salt).

JSON


"CMSHashStringSalt": "eb2d6fac-8b9e-427c-b98b-3c562dffbb35",

Random GUID

CMSImageExtensions

Specifies the file extensions that the system recognizes as image files. For example, files of these types are offered in the Insert image dialog of the rich text editor.

Note: If this key is not configured, the system attempts to automatically detect and support any media image file type. Adding the key disables the automatic detection, and only the explicitly listed file types are supported as images.

JSON


"CMSImageExtensions": "bmp;gif;ico;png;wmf;jpg;jpeg;tiff;tif;webp"

bmp;gif;ico;png;
wmf;jpg;jpeg;tiff;
tif;webp

CMSLogKeepPercent

The size of the system’s event log is limited by the Settings → System → Event log size setting. This key determines the extra percentage of events that is retained in the log over the specified limit. This percentage of the oldest events is deleted by batch when the percentage is exceeded.

For example, if the event log size is 1000 and the CMSLogKeepPercent is 20, the event log can contain up to 1200 events, and the 200 oldest events are deleted when the log size reaches 1201.

If the key is set to 0, the event log retains the exact number of records specified by the limit.

JSON


"CMSLogKeepPercent": 20,

10

CMSBuilderScriptsIncludeJQuery

Determines whether the system links the jQuery library to live site pages containing Page Builder content or forms.

Set to false if you wish to disable the usage of jQuery in Page Builder content (all default features remain functional without jQuery). See Exclude jQuery from builder scripts.

JSON

{
    "CMSBuilderScriptsIncludeJQuery": false
} 

true

> Back to list of configuration key categories

Continuous Integration and Deployment settings

You can use the following keys to configure the Continuous Integration and Continuous Deployment features:

Key

Description

Default

CMSCIEncoding

Sets the character encoding used when the CI/CD features generate non-binary files in the repository folder. The key supports values matching the encoding names listed in the Encoding Class article.

Changing the value of the CMSCIEncoding key does not update the encoding type of existing files in the repository folder. To fully update the encoding of the repository content, you need to:

  • Run complete serialization for all objects.
  • Manually update the encoding type of your repository configuration file.
JSON


"CMSCIEncoding": "utf-16",

utf-8

CMSCIRepositoryPath

Sets the location of the Continuous Integration file repository root folder. The key’s value must be an absolute or relative path of a folder on a local drive, or a network location for which the application has sufficient permissions.

The specified location is used when serializing object data to the file system and when restoring data back to the database. The key also allows you to set a shared Continuous Integration repository when developing multiple projects with the same database.

JSON


"CMSCIRepositoryPath": "C:\\ExternalSourceControl\\CIRepository",

App_Data\CIRepository

> Back to list of configuration key categories

Contact management settings

By adding the following keys, you can configure the behavior of contact management.

Key

Description

Default

CMSProcessContactActionsInterval

Sets the interval (in seconds) in which contact data and activities are batch processed by the system. Consider raising the interval if your system processes a large number of activities.

The interval affects the following:

  • How often the application saves logged activities and contact detail updates from the memory into the database.
  • How often the system recalculates data that could be affected by activities and contact updates, such as contact groups.
JSON


"CMSProcessContactActionsInterval": 30,

10

CMSCreateContactActionsLogWorker

If enabled, all web farm servers recalculate contact groups.

If you wish to improve performance, you can set this key to false for one or more of your web farm servers, and the recalculation will be disabled for them.

Note: If you set the key value to false for all of your web farm servers, the recalculation will be disabled completely.

JSON


"CMSCreateContactActionsLogWorker": false,

true

> Back to list of configuration key categories

Headless API settings

The following keys configure the behavior of the GraphQL API and Tracking API for all headless channels.

The configuration keys for the headless API must be placed under the CMSHeadless section in the configuration hierarchy.

JSON
Headless API configuration example

{
  ...

  "CMSHeadless": {
    "AllowIntrospection": "true",
    "GraphQlEndpointPath": "/api",
    "Caching": {
      "AbsoluteExpiration": "360"
    }
  }
}

Key

Description

Default

Enable

Specifies whether headless channel endpoints are enabled (both GraphQL API and Tracking API endpoints).

true

EnableTracking

Specifies whether Tracking API endpoints are enabled. Allows you to disable the tracking API while keeping the GraphQL API enabled. The default value is true.

true

EnableComplexity

Specifies whether complexity analysis is enabled.

true

AllowIntrospection

Specifies whether GraphQL introspection is enabled (__schema queries and GUI tools for exploring the schema).

false

GraphQlEndpointPath

Specifies the slug used in headless channel GraphQL endpoint URLs. Must include the leading slash (‘/’).

/graphql

CorsAllowedOrigins

Specifies domains that are allowed origins for CORS (Cross-Origin Resource Sharing). See Retrieve headless content to learn more.

Note: We recommend configuring allowed origins for CORS in the Settings application within the Xperience administration, via the Content → Headless → Allowed origins setting. The setting overrides any values set in your application’s configuration file or startup options.

""

CorsAllowedHeaders

Indicates which HTTP headers are allowed for content retrieval requests. If not set, all headers are allowed by default. See Retrieve headless content to learn more.

All headers

Caching

Contains options which allow you to customize caching behavior for headless content. The default values provide optimal caching performance for most projects.

  • Enable – a boolean value that specifies whether caching is enabled. The default value is true.
  • UseRequestCacheControlHeaders – a boolean property that specifies whether caching respects the Cache-Control header of individual requests. The default value is true.
  • AddResponseCacheControlHeaders – a boolean property that specifies whether caching sets the Cache-Control response header. The default value is true.
  • UseCacheDependencies – a boolean property that specifies whether caching uses cache dependencies to flush the cache when data in a cached response changes. The default value is true.
  • AbsoluteExpiration – specifies the maximum expiration time for a cache entry in minutes. The default value is 12 hours.
  • SlidingExpiration – specifies a sliding expiration date for cache entries in minutes. Cannot exceed the value of AbsoluteExpiration. The default value is 1 hour.
  • SizeLimit – maximum size for in-memory cache in bytes. The default value is 100 megabytes.

See Description

> Back to list of configuration key categories

Connection string

The database used by Xperience is specified by the CMSConnectionString connection string.

JSON


{
  ...
  "ConnectionStrings": {
    "CMSConnectionString": "Data Source=myserver;Initial Catalog=Xperience;Integrated Security=True;Persist Security Info=False;Connect Timeout=120;Encrypt=False;Current Language=English;" },
  ...
}