Refused to load the font

Hello everyone,

first of all I am a total newbie in JavaScript.

I wanted to implement the modeler into an webserver which was not really a problem. I builded the package and imported it into the root folder of the webserver. Everything just works perfectly fine except the icons from the toolbar on the left are not aviable. This only occurs when opening the modeler from the webserver. When opening the modeler as local file on my desktop there is not a single problem.

The error message I get is:

Refused to load the font ‘data:application/octet-stream;base64,d09GrgABAAAAAD6EAAsAAAAAukAAAQAAAAAA …’ because it violates the following Content Security Policy directive: “default-src” ‘self’". Note that ‘font-src’ was not explicitly set, so ‘default-src’ is used as a fallback.

I tried adding this " < meta http-equiv=“Content-Security-Policy” content=“font-src ‘self’ data:;”> " to the index.html, but it didn’t change anything.

This looks like a problem with the content security settings of your webserver. If the security policy is set via headers, this might take precedent over the meta tag, but I am not sure about this.

I think you have the correct approach, adding a font-src rule. You can check the documentation of the server you are using on how to configure the Content Security Policy in the response headers.

Thank you, i corrected the error. It was a header deep in the configuration.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.