We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
According to Netlify post, link path should have rel and as and Fonts should crossorigin tag with two acceptable values (anonymous or use-credentials). (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin)
rel
as
crossorigin
And a type and media attributes also should be acceptable. (Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content)
Exemple:
Link: </js/example-script.js>; rel=preload; as=script Link: </font/example-font.woff2>; rel=preload; as=font; crossorigin=anonymous Link: </images/bg-image-narrow.png>; rel=preload; as=image; media='(max-width: 600px)'
Looking in transformer.js:
transformer.js
module.exports.netlify = (headers, headersFile) => { const netlifyHeader = headers.map( ({source, headers}) => `${source}\n\tLink: ${headers}` ); fs.appendFileSync(headersFile, '\n' + netlifyHeader.join('\n')); };
I think the only solution is test headers extentions to add as (and crossorigin to fonts) based on file's type. What do you think?
headers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi.
According to Netlify post, link path should have
rel
andas
and Fonts shouldcrossorigin
tag with two acceptable values (anonymous or use-credentials). (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-crossorigin)And a type and media attributes also should be acceptable. (Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content)
Exemple:
Looking in
transformer.js
:I think the only solution is test
headers
extentions to addas
(andcrossorigin
to fonts) based on file's type.What do you think?
The text was updated successfully, but these errors were encountered: