Skip to content

Commit

Permalink
build(docs-infra): enable Trusted Types enforcement in angular.json (a…
Browse files Browse the repository at this point in the history
…ngular#42800)

Configure angular.json to serve a CSP header that enabled Trusted Types
in enforcement mode, both in e2e tests and when running the local
development server. This should help prevent regressions related to
Trusted Types in the angular.io app.

PR Close angular#42800
  • Loading branch information
bjarkler authored and AndrewKushnir committed Sep 9, 2021
1 parent 2670e96 commit b668f6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aio/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"headers": {
"Content-Security-Policy": "require-trusted-types-for 'script'; trusted-types angular angular#bundler angular#unsafe-bypass aio#analytics google#safe"
}
},
"configurations": {
"next": {
"browserTarget": "site:build:next"
Expand Down

0 comments on commit b668f6d

Please sign in to comment.