- Issue created by @gapple
- 🇨🇦Canada gapple
✨ Add helper for safely appending nonce/hash sources Fixed will help modules that want to use a nonce or need
'unsafe-inline'
to do so properly, but is order dependent:- If
'unsafe-inline'
is required it needs to be added to the policy early in the Alter event - If a nonce or hash is added, it needs to be done later in the Alter event
Otherwise fallback values (other than
'unsafe-inline'
) for the features that use a hash or nonce won't be present in the directive as necessary, and they could be blocked by the policy.Having a way to collect all alternates and only resolve them when the final policy is being built will make it so that the calling order is not relevant, and developers are less likely to encounter issues if they're not aware of the need for proper ordering of policy modifications.
- If
- 🇦🇺Australia dpi Perth, Australia
Related work @ ✨ Allow CSP to be added by render elements Needs review