Modify Content Security Policy for Session Replay

  • Latest Dynatrace
  • How-to guide
  • 1-min read
  • Published May 07, 2026

Session Replay uses web workers to process data during recording, offloading logic from the UI thread to improve performance. The RUM JavaScript achieves this by loading the code as a blob. For this to work, you must add blob: to the worker-src directive of your CSP rules, in addition to the adaptations described in Modify Content Security Policy for RUM. You can define CSP rules via the Content-Security-Policy HTTP response header or using a <meta> tag placed in the <head> section of the HTML document.

If blob: is not allowed in worker-src—or, as a fallback, in script-src—a CSP violation will occur when the page loads, and all code will run in the UI thread instead.

If you can't run web workers on your website or want to deactivate their use by Session Replay, you can do so by adding a custom configuration property.

To deactivate the use of web workers by Session Replay

  1. Go to Web.
  2. Select the application that you want to configure.
  3. In the upper-right corner of the application overview page, select More () > Edit.
  4. From the application settings, select Capturing > Custom configuration properties.
  1. Select Add a custom configuration property.
  2. Enter the property srbw=0 and save the changes.

We do not recommend running the Session Replay code in the UI thread instead of using web workers, since it will impact page performance.

Related tags
Digital Experience