Sitefinity Content Security Policy Setting

sitefinity | 2020-12-20

Where to Find the Setting?

Starting from Sitefinity CMS version 11, you can configure the Content Security Policy (CSP) rules directly in the backend dashboard:

  • Navigate to:
    /Sitefinity/Administration/Settings/Basic/WebSecurityBasicSettings

setting1


⚠️ Important Note

Do not remove the default CSP rules.
Altering or removing them without understanding their implications may unintentionally break both the frontend and backend interfaces of Sitefinity.

Example of a broken frontend:

screen1

Example of a broken backend:

screen2


🛠️ How to Fix It?

If you’ve already made changes and encountered issues, you can restore the CSP rules using a database script.

  1. Download and extract the ZIP file.
  2. Update the script with your intended CSP settings.
  3. Execute it on your Sitefinity database to apply the corrections.

Alternatively, you can consider to Creating a separate Web Security module / CSP headers for frontend and backend site


📚 References