Skip to content

Commit

Permalink
added crossorigin fore preload and preconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirk Fletcher committed May 12, 2019
1 parent d49652f commit 74d32f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/filters/InsertDNSPreconnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function render($view)
if (array_key_exists('host', $domainParts)) {
$url = (array_key_exists('scheme', $domainParts)) ? $domainParts['scheme'] . '://' . $domainParts['host'] : 'https://' . $domainParts['host'];

return "<link rel=\"preconnect\" href=\"{$url}\">";
return "<link rel=\"preconnect\" href=\"{$url}\" crossorigin>";
} else {
return '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/filters/InsertPreload.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function render($view)
$type = 'image';
}

return "<link rel=\"preload\" href=\"{$preloadItem}\" as=\"{$type}\">";
return "<link rel=\"preload\" href=\"{$preloadItem}\" as=\"{$type}\" crossorigin>";
} else {
return '';
}
Expand Down

0 comments on commit 74d32f5

Please sign in to comment.