Skip to content

The CSP directive ‘frame-ancestors’ does not support the source expression ”unsafe-inline”

I can’t succeed to make this error messages removed from my M 2.4

I did my custom csp module, everything works fine except this one

The Content-Security-Policy directive ‘frame-ancestors’ does not support the source expression ”unsafe-inline”

I did tried the following fix.
But nothing worked

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <csp>
        <mode>
            <storefront>
                <report_only>0</report_only>
            </storefront>
            <admin>
                <report_only>0</report_only>
            </admin>
        </mode>
        <policies>
            <storefront>
                <frame-ancestors>
                    <inline>0</inline>
                </frame-ancestors>
            </storefront>
        </policies>
    </csp>
</default>
</config>