I have a sharepoint online site that has been setup for CDN(THIS IS NOT SPFX) and its using font awesome as part of the branding. The issue is its giving me the errors in the link below https://ibb.co/fx6K4U

A sample of the url webfont is


Also getting error CSS3116: @font-face failed cross-origin request. Resource access is restricted.

Thanks in Advance


Does "Get-SPOTenant | Select PublicCdnAllowedFileTypes" show WOFF2 as an allowed type?

Updated by using following scripts: Set-SPOTenant -PublicCdnAllowedFileTypes "CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF,WOFF2"

maybe wait for 5 - 10 min for the error to go away.

If it was returning false. The easiest way to load CSS from CDN is using the ModuleLoader class.

First, you import ModuleLoader in your code:

import ModuleLoader from '@microsoft/sp-module-loader';

Then, in the web part's constructor you use it to load the CSS file from CDN:

public constructor(context: IWebPartContext) { super(context); ModuleLoader.loadCss('https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css'); }

  • Thanks Xin. When i tested to see if the public CDN was enabled its returning false. Should i be doing the test in site administration level? – naijacoder Oct 10 '18 at 5:48
  • You can try it. Also, you see my new update in above, I don't think you need to import the font. – Xin Ning Oct 10 '18 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.