Enable the Content Security Policy for Real User Monitoring
If the RUM Agent request from the client browser fails due to blocked:csp error as below, you need to enable the content security policy directive in the web server for Real User Monitoring. This page will guide you on it.
What is Content Security Policy (CSP)
Content Security Policy (CSP) is an essential security standard designed to protect web applications from cross-site scripting (XSS) and other code injection attacks. However, it's important to note that a strict CSP may inadvertently block inline JavaScript and prevent the browser from sending monitoring data to the Real User Monitoring agent.
How CSP rule is configured in the application?
CSP rules can be set via the <meta> element in the page or the response HTTP header.
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; connect-src 'self';"/>
How to enable Content Security Policy (CSP) for Real User Monitoring?
CSP rules on a page must be configured in such a way it should allow loading and executing of RUM script.
- Step 1: Copy the RUM Agent URL from the script injected in your application.
- Step 2: Construct the content script policy to allow the copied RUM Agent url
Content-Security-Policy: connect-src 'self' https://your.corp.com:7443; script-src 'unsafe-inline' https://your.corp.com:7443;
- Step 3: Restart your application(if required) and check whether the real user monitoring is enabled for the site.
New to ADSelfService Plus?
Related Articles
Real User Monitor (RUM) - Troubleshooting
If the monitor has not polled data for a long time, follow the steps below for troubleshooting: Step 1: Check prerequisites to be done Real User Monitor requires the RUM Agent to be installed and mapped to the Applications Manager. Refer the help ...
Real User Monitoring Agent - Frequently asked questions
How to change Applications Manager details in RUM Agent? Open the AppServer.properties file located under <RUMAgent_Home>/conf/ directory in any text editor. Update Applications Manager hostname in apm.host key. Update Applications Manager SSL Port ...
How to enable HTTPS connection between end user and RUM Agent?
By default end user data will be collected and sent via HTTP connection to RUM Agent. To enable HTTPS connection you should have an valid SSL Certificate (keystore file basically), not a self signed certificate. For RUM Agent version below 4.0, Open ...
Self monitor Applications Manager using Real User Monitoring
We can monitor the Applications Manager using Real User Monitoring with a Java Script injection and this can be used to measure the Applications Manager's performance continuously. All you need is to install and setup the Real User Monitoring (RUM) ...
Troubleshoot - RUM Agent silent installation
RUM Agent silent installation can fail on various factors based on your environment, troubleshoot with the help of error message shown while running the script. Below are the list of the error messages thrown from the script and its troubleshooting ...