Skip to content

Commit 99e8bce

Browse files
authored
propose fix for CORS issues with missing crossorigin tag
#55
1 parent fc18456 commit 99e8bce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Asset/TagRenderer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function renderWebpackScriptTags(string $entryName, string $packageName =
5252

5353
if (isset($integrityHashes[$filename])) {
5454
$attributes['integrity'] = $integrityHashes[$filename];
55+
$attributes['crossorigin'] = 'anonymous';
5556
}
5657

5758
$scriptTags[] = sprintf(
@@ -77,6 +78,7 @@ public function renderWebpackLinkTags(string $entryName, string $packageName = n
7778

7879
if (isset($integrityHashes[$filename])) {
7980
$attributes['integrity'] = $integrityHashes[$filename];
81+
$attributes['crossorigin'] = 'anonymous';
8082
}
8183

8284
$scriptTags[] = sprintf(

0 commit comments

Comments
 (0)