CORS error suddenly shows – site was working fine until today

Armin Hierstetter picture Armin Hierstetter · Feb 15, 2017 · Viewed 11.9k times · Source

Since this morning I get CORS errors in Chrome for my website trying to load font awesome fonts from a CDN. Both, production and development server are affected. I have not changed anything, the error came completely out of the blue:

Access to Font at 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2' from origin 'https://www.xxxx.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.xxxx.com' is therefore not allowed access. The response had HTTP status code 502.

I have added

Header set Access-Control-Allow-Origin "*"

to the .htaccess of my server to no avail.

What do I need to do to make this error go away?

Answer