build(docs-infra): enable Trusted Types enforcement in angular.json (#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 #42800
This commit is contained in:
Bjarki 2021-07-06 03:09:18 +00:00 committed by Andrew Kushnir
parent 2670e964ec
commit b668f6d2ff

View file

@ -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"