The Web Content object displays "The content is blocked" when rendered in a SAS® Visual Analytics report


When you use the Web Content object in a report on SAS Visual Analytics for SAS® Viya®, the following error message might be displayed:

"The Content is blocked. Contact the site owner to fix the issue."

Cause

If you enable browser developer tools (SAS KB0036430) and check the Console output, a message similar to the following might be displayed:

Framing 'https://www.sas.com/' violates the following Content Security Policy directive: "frame-src 'self' blob: data: mailto:". The request has been blocked.

This message comes from the content-security-policy defined for SAS Visual Analytics. In order to display content in the Web Content object, the content-security-policy must include the frame-src directive that contains the host of the web content. 

Resolution

To resolve the issue, an administrator complete the following steps:

  1. Log on to SAS® Environment Manager as an Administrator
  2. Navigate to Configuration ► All Services ► SAS Visual Analytics.
  3. Edit the sas.commons.web.security section
  4. Update the content-security-policy to include the frame-src directive. Using an * means that any host is allowed. Otherwise, you must specify the web content host name. Here is an example:

    frame-src *;
    frame-src https://www.sas.com;

  5. Restart the sas-visual-analytics-app pod.