Cross-Origin request warning for google fonts

前端 未结 4 2114
生来不讨喜
生来不讨喜 2021-02-19 00:12

I am using Google Webfonts on my website. In the console on Chrome I get the following warning:

Blink is considering rejecting non spec-compliant cross-or

相关标签:
4条回答
  • 2021-02-19 00:23

    In my case I was overwriting the location using the sensors -> location tool in the Chrome dev tools. After setting it to "No override" it worked fine:

    0 讨论(0)
  • 2021-02-19 00:34

    If you have this issue just in one browser:

    I had a Chrome Browser Extension running which caused this problem. In my case it was "Alexa page rank" - but test out all your extensions by disabling one after the other.

    0 讨论(0)
  • 2021-02-19 00:43

    Ok, so clearly Google Fonts allows cross-domain access or their service wouldn't be much use.

    The explanation for my particular problem is that I'm on a corporate internet connection. It must use some proxy that is stripping out access control headers from web responses. This causes the browser to give warnings or failures when loading the resources.

    I've contacted IT warning them about their misconfigured proxy and hopefully this will be fixed.

    0 讨论(0)
  • 2021-02-19 00:45

    CORS header is not being served under certain circumstances. Fonts are failing to set this header randomly.

    This is a Google bug and you can't fix this as they are not serving the header. I recommend to cease using this buggy Google CDN service and download fonts instead and serve them from your web server.

    0 讨论(0)
提交回复
热议问题