Skip to content

Commit

Permalink
fix(@angular/build): add CSP nonce attribute to script tags when in…
Browse files Browse the repository at this point in the history
…line critical CSS is disabled

Prior to this change when inline critical CSS is disabled CSP `nonce` was not added to script tags.

Closes angular#28102
  • Loading branch information
alan-agius4 committed Jul 26, 2024
1 parent bd1e0d8 commit a5d6c2b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export class IndexHtmlGenerator {
this.csrPlugins.push(inlineCriticalCssPlugin(this));
}

this.csrPlugins.push(addNoncePlugin());

// SSR plugins
if (options.generateDedicatedSSRContent) {
this.ssrPlugins.push(addEventDispatchContractPlugin(), addNoncePlugin());
Expand Down

0 comments on commit a5d6c2b

Please sign in to comment.