Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fix Spree CDN when no host is set at all (#12017)
Damian Legawiec2ddfedaa8423
diff --git a/core/config/routes.rb b/core/config/routes.rbindex ff404b3d0e..ed68cd6243 100644--- a/core/config/routes.rb+++ b/core/config/routes.rb@@ -4,7 +4,8 @@ Rails.application.routes.draw dodirect :cdn_image do |model, options|options[:host] = Spree.cdn_host if Spree.cdn_host.present?options[:host] ||= Rails.application.routes.default_url_options[:host]- options[:host] ||= 'localhost' if Rails.env.development?++ options[:only_path] = true if options[:host].blank?if model.blob.service_name == 'cloudinary' && defined?(Cloudinary)if model.class.method_defined?(:has_mvariation)