Icons not showing up after setting up custom domain

Hello,
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.
Thanks!

Hi, @mcoshima, I’m seeing this error in the javascript console:

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.
Thanks.

Never mind. I figured out the solution. I added

The following redirect is intended for use with most SPAs that handle

routing internally.

[[redirects]]
from = “/*”
to = “/index.html”
status = 200

[[headers]]

Define which paths this specific [[headers]] block will cover.

for = “/"
[headers.values]
Access-Control-Allow-Origin = "

to my netlify.toml file and it works now.

1 Like

great work on figuring that out! :+1: