Content security policy error with Target


Target Standard

Target Premium


Website's Content Security Policy Headers block Target libraries and prevents editing a page in Target Visual composer.


Steps to resolve

You can configure a Requestly rule to remove CSP headers, as shown below


For Requestly, whenever there is a need to remove headers, you should do either of following:
To use the Requestly extension on Chrome:
a) Install the Requestly browser extension on Chrome.
b) Open the extension and configure it using the following:
c) Select Modify headers.
e) Enter the following:

  • Rule name
  • Modification rules
  • Toggle Add to Remove.
  • Toggle Request to Response.
  • Enter "Content-Security-Policy" as the header name.
  • Click Save.
  • You should now be able to load the page quickly with the Visual Experience Composer.

Note: Add URL rules for the URL that you want to open in the VEC so that headers are removed for those URLs only.
Enable the rule when you are editing in the VEC and disable the rule when you are not using the VEC.