Closed sprankhub closed 4 years ago
Excellent idea, hope to get a release out soon!
Note to self: the cache ID is csp_whitelist_config
(use with scope prefix $scopeCode . '::csp_whitelist_config'
).
(Ref. \Magento\Csp\Model\Collector\CspWhitelistXml\Data::__construct
)
Q: what are the supported scopes? See https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html
Implemented in release 1.0.31.
You are awesome! Thanks!
As of version 2.3.5 / 2.4, Magento has a CSP module. If one wants to add domains to the CSP header, one needs to create / edit a file
etc/csp_whitelist.xml
. I just did this and found out that this tool does not detect such changes yet. It is necessary to flush the config cache manually after a change to such a file. Maybe a more fine-grained cache clean is possible than a full config cache flush - I did not check this TBH.