I’ve used Space’CD to upload my assets but when I’m trying to load font I got CORS problem. Should i add some config in my server ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The following error is : Access to font at ‘https://santalabspace.sgp1.digitaloceanspaces.com/fonts/fontawesome-webfont.woff2?v=4.7.0’ from origin ‘<URL>’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
It’s been a while since you posted this and I hope you’ve resolved your issue. However for the sake of searches throughout the land I had a similar issue and stumbled across your post and hoped for an answer for myself but evidently to no avail.
Anyway, I found that defining my CORS policy with my domain and adding just the header Access-Control-Allow-Origin, then flushing the cache of the fonts allowed them to work on my website.
The CORS policy you set on files does not take effect until you flush the cache.
I am having the same issue. I have @font-face { font-family: “bootstrap-icons”; src: url(“…/fonts/bootstrap-icons.woff2”) format(“woff2”), url(“…/fonts/bootstrap-icons.woff”) format(“woff”); } inside bootstrap.css. Both these fonts are blocked
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.