There are some necessary considerations to using nonces over hashes, but could significantly shorten the resulting policy if multiple code blocks are added to a page.
There are some necessary considerations to using nonces over hashes, but could significantly shorten the resulting policy if multiple code blocks are added to a page.
Comments
Comment #3
gappleSince this has some risks, and is less likely to be compatible with the Dynamic Page Cache than using hashes, there is no interface but using a nonce can be enabled with a config option:
Comment #5
modestmoes commentedI noticed that the config schema changed. If using version 1.2 or later, the updated config override is:
$config['attachinline.settings']['csp-allow-method'] = 'nonce';