client link crossorigin
This commit is contained in:
@@ -132,7 +132,11 @@ class ClientManager
|
||||
$as = $item['as'] ?? '';
|
||||
$rel = $item['rel'] ?? '';
|
||||
$type = $item['type'] ?? '';
|
||||
$linksHtml .= "\n <link rel=\"{$rel}\" href=\"{$href}\" as=\"{$as}\" as=\"{$type}\">";
|
||||
$additinalPlaceholder = '';
|
||||
if (empty($item['crossorigin'])) {
|
||||
$additinalPlaceholder .= ' crossorigin';
|
||||
}
|
||||
$linksHtml .= "\n <link rel=\"{$rel}\" href=\"{$href}\" as=\"{$as}\" as=\"{$type}\"{$additinalPlaceholder}>";
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
||||
@@ -31,14 +31,16 @@
|
||||
"as": "font",
|
||||
"type": "font/ttf",
|
||||
"rel": "preload",
|
||||
"noTimestamp": true
|
||||
"noTimestamp": true,
|
||||
"crossorigin": true
|
||||
},
|
||||
{
|
||||
"href": "client/fonts/open-sans/OpenSans-Regular.ttf",
|
||||
"as": "font",
|
||||
"type": "font/ttf",
|
||||
"rel": "preload",
|
||||
"noTimestamp": true
|
||||
"noTimestamp": true,
|
||||
"crossorigin": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user