Search code examples
javascriptcssmeteorbrowsercross-browser

Refused to load the stylesheet '......' because it violates the following Content Security Policy


I'm working on an application that implements browser-policy. Based on the documentation here [https://themeteorchef.com/tutorials/using-the-browser-policy-package][1], I added the options of allow some domains like Google Fonts, W3 Schools css.

To my surprise all the option set did results more in a bulky error. I do not know what to do.

This is the code:

Meteor.startup( () => {
    BrowserPolicy.content.allowEval();
    BrowserPolicy.content.allowInlineStyles();
    BrowserPolicy.content.allowInlineScripts();
    BrowserPolicy.content.allowStyleOrigin('w3schools.com');
    BrowserPolicy.content.allowOriginForAll( 'fonts.googleapis.com' );
});

This is the error message:

    Refused to load the stylesheet 'https://www.w3schools.com/w3css/4/w3.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' http://w3schools.com https://w3schools.com http://fonts.googleapis.com https://fonts.googleapis.com".
    
    home:10 Refused to load the stylesheet 'https://www.w3schools.com/lib/w3-theme-blue-grey.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' http://w3schools.com https://w3schools.com http://fonts.googleapis.com https://fonts.googleapis.com".
    
    home:157 Refused to load the stylesheet 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' http://w3schools.com https://w3schools.com http://fonts.googleapis.com https://fonts.googleapis.com".
    
    home:181 Refused to load the script 'http://www.google-analytics.com/ga.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' http://fonts.googleapis.com https://fonts.googleapis.com".
    
    (anonymous) @ home:181
    (anonymous) @ home:182
    home:204 Refused to load the stylesheet 'https://www.w3schools.com/w3css/4/w3.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' http://w3schools.com https://w3schools.com http://fonts.googleapis.com https://fonts.googleapis.com".
    
    home:205 Refused to load the stylesheet 'https://www.w3schools.com/lib/w3-theme-blue-grey.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' http://w3schools.com https://w3schools.com http://fonts.googleapis.com https://fonts.googleapis.com".
    
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGKhisFFF-0ifc-Simo8uwJs.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGNJvocFWY_5VFjYFbAOOIik.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGLGN1mc631ObjHzqJB_dFFA.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGI3P6ux3HwbL10a8ofNXGLA.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGD_j0nMiB9fPhg_k1wdK2h0.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGDRVvBvQIc1z78c__uoBcyI.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGMKLL5CtqrIC1MmqTPxryYA.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGLttwilxDzpVRPUtYE2He8E.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGMqNlGGfRq7bLR7KpoutytU.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGDN0peKJ_L8b-UGHSLXfhhU.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGLpVETArfVi9McBbsQ4atuQ.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGEfh7q1GW6w7vv_rRnRqMrY.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGHZhYM0_6AejPZE-OqA592o.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAFQ0ABEAAAAAvI…rnptIwTkWGE9bL/2LchXN+inLcDLxE7fAT7xFB4hM6CbaEib4mSsIr4jjCV4pIX7nsL37WAw==' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGoUABEAAAAAvJA…yA/lwxAAf/NQSDtWIEhivFGIyWigkYLxSHYJIrpuCQK47ANGwpKOEfDz5cKAAAAAABViuSJAAA' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAFQwABEAAAAAu+…TMo+yMPA6lZ2QRKDkj9UHxGYkaRWfE00yl+QXhIKt7l1TvpYyaq9tpVfMDKs1aPYiU6adsBAAA' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGsMABEAAAAAu+g…HK0icGuaVH9BeWLtFLLadE92YZ9x/IQ8dskvRJDOk/SWmS7H40mOk31btNXAAAAAFWK5GuAAA=' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    meteorInstall.node_modules.meteor.es5-shim.client.js @ es5-shim.js?hash=adc3c62…:33
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130
    (anonymous) @ es5-shim.js?hash=adc3c62…:2783
    (anonymous) @ es5-shim.js?hash=adc3c62…:2789
    es5-shim.js?hash=adc3c62…:1143 Refused to load the font 'https://fonts.gstatic.com/s/opensans/v14/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2' because it violates the following Content Security Policy directive: "default-src 'self' http://fonts.googleapis.com https://fonts.googleapis.com". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
    
    (anonymous) @ es5-shim.js?hash=adc3c62…:1143
    (anonymous) @ es5-shim.js?hash=adc3c62…:1151
    $Array @ es5-shim.js?hash=adc3c62…:164
    es5-shim.js @ es5-shim.js?hash=adc3c62…:169
    fileEvaluate @ modules-runtime.js?hash=2b888cb…:207
    require @ modules-runtime.js?hash=2b888cb…:130

https://themeteorchef.com/tutorials/using-the-browser-policy-package


Solution

  • Your code seems good. I am not pretty sure but let try put https in your link:

    //...
    BrowserPolicy.content.allowStyleOrigin('https://w3schools.com');
    BrowserPolicy.content.allowOriginForAll('https://fonts.googleapis.com');
    //...