I built a Hugo site and deployed it with Netlify. I just created a custom domain for my website (eruditedatasolutions.com) and now the icons are not showing up. All I see is an empty box where they should be. They worked fine before I changed the domain and the only thing I changed since then is the baseURL in my config toml file. The icons are themefisher icons (found at this repository https://github.com/themefisher/themefisher-font).
Any suggestions for how to get them to show up again would be great.
eruditedatasolutions.netlify.app/:1 Access to font at 'https://www.eruditedatasolutions.com/plugins/themefisher-font/fonts/themefisher-font.woff?ug5hnh' from origin 'https://eruditedatasolutions.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It looks like the site CORS policy preventing it from loading unless the request comes from the custom domain. Adjusting the CORS policy or making the request not include the custom domain would be two possible solutions.
How do I adjust the CORS policy? I’m pretty new to all of this.
Never mind. I figured out the solution. I added
The following redirect is intended for use with most SPAs that handle
from = “/*”
to = “/index.html”
status = 200
Define which paths this specific [[headers]] block will cover.
for = “/"
Access-Control-Allow-Origin = "”
to my netlify.toml file and it works now.
great work on figuring that out!