CORS error on Chrome with Google Fonts
Depending on the case, there are a few ways to fix this problem but I think these three are the most common solutions:
1. [Google Cloud] Configuring CORS on a Bucket
gsutil cors set cors-json-file.json gs://example
where cors-json-file.json is a your CORS configuration file:
[ { "origin": ["http://example.appspot.com"], "responseHeader": ["Content-Type"], "method": ["GET", "HEAD", "DELETE"], "maxAgeSeconds": 3600 }]
2. [Nginx] Force Access-Control-Allow-Origin
Go to /etc/nginx/sites-available/[your_server_config] and add this line into your server block:
add_header Access-Control-Allow-Origin *;
More: https://serverfault.com/questions/162429/how-do-i-add-access-control-allow-origin-in-nginx
3. [Django-cors] Adds CORS headers to Django responses.
Check this out: