Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove crossorigin='anonymous' from preconnect hints. Only needed for…
… fonts, xhr and es module loads
  • Loading branch information
Munter committed Dec 22, 2017
1 parent 123ee4f commit bd5109e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/netlify-headers.js
Expand Up @@ -14,7 +14,7 @@ var resourceHintTypeMap = {
function getHeaderForRelation (rel) {
let header = `Link: <${rel.href}>; rel=${resourceHintTypeMap[rel.type]}; as=${rel.as}; type=${rel.to.contentType}`;

if (rel.crossorigin || rel.as === 'font') {
if (rel.as === 'font') {
header = `${header}; crossorigin=anonymous`;
}

Expand Down Expand Up @@ -74,10 +74,6 @@ new AssetGraph({ root: 'docs/_dist' })
resourceHintRelations.forEach(rel => {
let header = `Link: <${rel.href}>; rel=preconnect`;

if (rel.crossorigin) {
header = `${header}; crossorigin=anonymous`;
}

headerMap[url].push(header);

rel.detach();
Expand Down

0 comments on commit bd5109e

Please sign in to comment.