app/components/solidus_admin/ui/icon/component.rb in solidus_admin-0.3.1 vs app/components/solidus_admin/ui/icon/component.rb in solidus_admin-0.3.2
- old
+ new
@@ -21,9 +21,11 @@
@attrs['width'] = '16'
@attrs['height'] = '16'
end
def call
- href = "#{image_path('solidus_admin/remixicon.symbol.svg')}#ri-#{@name}"
+ # bypass the asset_host configuration to avoid CORS issues with CDNs:
+ # https://github.com/solidusio/solidus/issues/5657
+ href = asset_path("solidus_admin/remixicon.symbol.svg#ri-#{@name}", host: "")
tag.svg(tag.use("xlink:href": href), **@attrs)
end
end