Set crossorigin to anonymous for integrity attribute (#20348)

* Set crossorigin to anonymous for integrity attribute
dotnet/aspnetcore#20305

* Fix formatting of output
dotnet/aspnetcore#20305
This commit is contained in:
Markus Rodler 2020-04-01 18:53:46 +02:00 committed by GitHub
parent 5285c5e47e
commit a8bd551d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -133,6 +133,7 @@ function addScriptTagsToDocument(resourceLoader: WebAssemblyResourceLoader) {
if (resourceLoader.bootConfig.cacheBootResources) {
const contentHash = resourceLoader.bootConfig.resources.runtime[dotnetJsResourceName];
scriptElem.integrity = contentHash;
scriptElem.crossOrigin = 'anonymous';
}
document.body.appendChild(scriptElem);