Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 697 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 697 Bytes

Angular Universal CSP link bug reproduction.

How to reproduce

  1. Create a new angular project:
ng new
  1. Add nonce to app-root as explained here: https://angular.io/guide/security#content-security-policy
    We use a dummy value for nonce just for testing, for example:
<!-- src/index.html -->
<app-root ngCspNonce="123"></app-root>
  1. Add a stylesheet link to head, for example:
<!-- src/index.html -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" />
  1. Build and see error message
npm run build

# Index html generation failed.
# link.prev?.setAttribute is not a function