You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not all services are able to follow the currently recommended approach of using
hashes to allow specific inline scripts as part of their Content Security
Policy.
An alternative approach is to use a nonce which requires the attribute to be set
on the script itself.
Introduce a new Nunjucks variable `cspNonce` for the page template
to allow users to do this.
Copy file name to clipboardexpand all lines: src/govuk/template.test.js
+12
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,18 @@ describe('Template', () => {
165
165
// updating the hash published in https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#if-your-javascript-isn-t-working-properly
0 commit comments