Kentico 13 : "An item with the same key has already been added. Key: content-security-policy"

Yassine Layachi asked on April 22, 2024 12:03

Hello,

For security reasons, I had to modify the response headers and custom the Content-Security-Policy. Everything works fine whether it's the live site or the admin. Nevertheless, when I want to preview a page in the page builder, the following error is displayed in the event log : "An item with the same key has already been added. Key: content-security-policy".

I have followed the instructions of the documentation (https://docs.kentico.com/13/configuring-xperience/reference-web-config-application-keys) and I have disabled this key in order to implement my own CSP : <add key="CMSEnableClickjackingProtection" value="false"/>

But it doesn't work because I still have the error in the event log.

Did anyone face the same situation ?

Thanks for your help

   Please, sign in to be able to submit a new answer.