Skip to content

armgit / spree

Public Imported from GitHub
0

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.

`Store#formatted_url` support old legacy `localhost:3000` urls

Damian Legawiec4b828f019605
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 3bdd08f210..557e9f9319 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -273,7 +273,7 @@ module Spree
).to_s
else
URI::HTTP.build(
- host: url.to_s.sub(%r{^https?://}, ''),
+ host: url.to_s.sub(%r{^https?://}, '').split(':').first,
port: port
).to_s
end