How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?

143 views Asked by At

I am currently in a situation where I work on proxied websites over the MoovWeb platform. Sometimes fonts don't want to load on the proxy because of CORS issues. I know how to get these fonts to load, I simply just need to know which fonts are not loading. The console gives me this error

Font from origin 'https://www.example.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'cross-origin-example.com' is therefore not allowed access.

I looked at the networks panel, and all I see under the "fonts" section are 4 fonts with a status of 200. Are there any other ways of knowing which font the console is talking about? Any help is greatly appreciated, thank you.

2

There are 2 answers

0
Dirk Dunn On

I found that the answer lied in the fact that I was using google chrome. It seems only webkit browsers (Chrome and Safari) do not show the font file name. Firefox and IE both show the file that is missing.

1
juanca On

Alternatively you could also use the Moovweb SDK logger to see the messages. http://developer.moovweb.com/docs/local/debugging

This is a 'browser-free' alternative.

Juan