I have searched alot on the internet and I want to hide this error (magento 2.4) enter image description here

content security policy error , we don't have authority to disable magento_csp module and we can not create module, we just have theme, what are the best options to figure out this issue


Please disable Magento_Csp module

php bin/magento module:disable Magento_Csp

php bin/magento s:up

php bin/magento c:c


Into Magento_root/app/etc/config.php find Magento_Csp and put 1 to 0 like this then save the file and run php bin/magento s:up command.

'Magento_Csp' => 0,

I Hope This Helps You.

  • bro disabling module is not an option i have explained that in the question , you can read again
    – samair ali
    Jun 22 at 15:36
  • Ok then you have to whitelist all files which are coming from 3rd party site or url. Jun 22 at 16:06
  • You can google it how to whitelist in csp magento 2.4 Jun 22 at 16:06
  • i know how to whitelist it bro but disabling it with theme only is what i dont know , for that i have pasted the question
    – samair ali
    Jun 22 at 22:53
  • disable with theme what u by this?? its not possible man. you have to disable module or you have to whitelist file. no any other option :) Jun 23 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.