"[Report Only] Refused to load the font..." error message on console

Gustavo Siqueira picture Gustavo Siqueira · Oct 26, 2014 · Viewed 13.2k times · Source

More specifically:

[Report Only] Refused to load the font 'data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABBQAAoAAAAAG…H8zVsjnmMx0GcZ2HGViNOySWEa9fvEQtW43Nm+EOO0ZIpdLbMXoVzPJkcfHT6U+gLEpz/MAAAA' because it violates the following Content Security Policy directive: "font-src 'self'".

this is my contentSecurityPolicy object at environment.js:

contentSecurityPolicy: {
  'default-src': "'none'",
  'script-src': "'self' 'unsafe-inline' 'unsafe-eval' connect.facebook.net",
  'connect-src': "'self'",
  'img-src': "'self' www.facebook.com",
  'style-src': "'self' 'unsafe-inline'",
  'frame-src': "s-static.ak.facebook.com static.ak.facebook.com www.facebook.com",
  'report-uri': "http://localhost:4200"
},

Is there anything wrong?

Answer

oreoshake picture oreoshake · Oct 26, 2014

Add 'font-src': "data:", to whitelist the font being loaded.