Skip to content

Commit fd92ba3

Browse files
authored
added crossorigin for fonts (#31)
1 parent 5fb0d87 commit fd92ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HttpPush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function generateLinks() : array
4040
$links = [];
4141

4242
foreach ($this->resources as $row) {
43-
$links[] = '<'.$row['path'].'>; rel=preload; as='.$row['type'];
43+
$links[] = '<'.$row['path'].'>; rel=preload; as='.$row['type'].($row['type']==='font'?'; crossorigin':'');
4444
}
4545

4646
return $links;

0 commit comments

Comments
 (0)