I have installed extension for integrate facebook messenger chat. but giving " Refused to frame 'https://www.facebook.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://www.facebook.com" in console and also messenger live chat application not appear in front end. what should I do for get this work.
2 Answers
I'm guessing you updated to 2.3.5 version.
Just run this terminal command
php bin/magento module:disable Magento_Csp
More information here: https://maxchadwick.xyz/blog/magento-disable-csp
-
-
I think it has something to do with it, I-ve had the same issue with the Paypal frame and this solved it. Did you run the clean /flush cache commands? Just updated the answer with the print of the error I was getting, please check if its similar to yours ;)– Joao71Commented Jul 6, 2020 at 12:41
-
You have to create a file etc/csp_whitelist.xml
<?xml version="1.0" encoding="UTF-8"?>
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="frame-src">
<values>
<value id="facebook-frame" type="host">*.facebook.com</value>
</values>
</policy>
<policies>
</csp_whitelist>