AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
817 stars 313 forks source link

No icons in admin interface (CORS problem) #2937

Open afdev82 opened 2 weeks ago

afdev82 commented 2 weeks ago

Hello,

I have updated my application to Rails 7.1 and Alchemy 7.2.2 and the icons on the admin interface are not showing up anymore. I am quite sure it worked before with Rails 7.0 and Alchemy 7.0.0. I have investigated and found that the svg file remixicon.symbol.svg doesn't get loaded from the asset host I'm using with the "not same-origin" error in the network panel of the developer tools. The request doesn't contain the "Origin" header, while all the other assets have it. I don't know if it's an issue with AlchemyCMS or Rails. Could someone help me on that? Thank you for your support.

tvdeyen commented 1 week ago

Could you show some output of the network panel where it tries to load the icon sprite? And examine the svg tag of the item that is in the DOM? Especially the href attribute.

Alchemy CMS - Dashboard 2024-06-27 21-15-58

afdev82 commented 6 days ago

Yes,

this is the svg in the DOM:

Screenshot 2024-06-28 at 09 04 14

And this is the request of the icon sprite:

Screenshot 2024-06-28 at 09 05 37

As you can see there is no ORIGIN header, but I don't have it for other assets too (css & js):

Screenshot 2024-06-28 at 09 07 15

I have some Sec-Fetch-* header, I would have expected something like that:

Sec-Fetch-Dest: image Sec-Fetch-Mode: no-cors Sec-Fetch-Site: cross-site

But I was not able to find where these headers are set.

tvdeyen commented 6 days ago

There is nothing we can do on our end I fear. The file is served from your cdn. You probably need to add svg format as asset type to your cdn configuration?

afdev82 commented 2 days ago

Hi,

yes, it's what I thought too. But I haven't changed my server configuration and the problem was there right after the update of Rails & AlchemyCMS, so I think something in the update has been changed. Maybe (most probably) it's the Rails update, but I have asked here before to get some hints. I will continue my research and let you know, thanks.