1

[Report Only] Refused to load the font '' because it violates the following Content Security Policy directive: "font-src *.fontawesome.com data: 'self' 'unsafe-inline'".

[Report Only] Refused to load the font 'https://cdn.livechatinc.com/widget/o-fgfgfg.woff2' because it violates the following Content Security Policy directive: "font-src *.fontawesome.com data: 'self' 'unsafe-inline'".

Can someone please tell me how to properly resolve this in csp_whitelist.xml?

Thank you

1 Answer 1

1

Create this file: etc/csp_whitelist.xml & add below code:

<?xml version="1.0"?>
<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="font-src">
            <values>
                <value id="livechatinc" type="host">*.livechatinc.com</value>
                <value id="data" type="host">'self' data:</value>
                <value id="data" type="host">'unsafe-inline' data:</value>
            </values>
        </policy>
        <policy id="style-src">
            <values>
                <value id="livechatinc" type="host">*.livechatinc.com</value>
            </values>
        </policy>
    </policies>
</csp_whitelist>

Please flush the configuration & try to check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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